TanStack
Reference

Theme Modules

Theme Modules

Bundled themes are isolated objects. Importing one theme does not include another or generate CSS.

ExportModuleType
auroraXTheme@tanstack/highlight/themes/aurora-xDark
draculaTheme@tanstack/highlight/themes/draculaDark
githubDarkTheme@tanstack/highlight/themes/github-darkDark
githubLightTheme@tanstack/highlight/themes/github-lightLight
monokaiTheme@tanstack/highlight/themes/monokaiDark
nordTheme@tanstack/highlight/themes/nordDark
oneDarkProTheme@tanstack/highlight/themes/one-dark-proDark
solarizedDarkTheme@tanstack/highlight/themes/solarized-darkDark
solarizedLightTheme@tanstack/highlight/themes/solarized-lightLight

Each module provides both its named export and the same object as its default export.

ts
import { createThemeCss } from '@tanstack/highlight/theme'
import { githubDarkTheme } from '@tanstack/highlight/themes/github-dark'
import { githubLightTheme } from '@tanstack/highlight/themes/github-light'

const css = createThemeCss({
  light: githubLightTheme,
  dark: githubDarkTheme,
})

The objects satisfy HighlightTheme. See the theme guide for custom selectors, CSS output, and authoring a theme.