UseThemeReturn
Defined in: src/hooks/useTheme/useTheme.types.ts:38
Properties
Section titled “Properties”getToken
Section titled “getToken”getToken: (
path) =>string
Defined in: src/hooks/useTheme/useTheme.types.ts:52
Resolve a single token to its current CSS-var value, e.g. '#007acc'.
Falls back to the dark-theme default when the underlying CSS variable is unset or when no DOM is available (SSR). Returns an empty string only for paths that don’t resolve to a leaf in the theme contract. Repeated calls for the same path are cached for the life of the hook instance.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
getVar
Section titled “getVar”getVar: (
path) =>string
Defined in: src/hooks/useTheme/useTheme.types.ts:62
Get the var(--etui-...) reference for a token, e.g.
'var(--etui-color-accent-primary)'. Useful for inline styles that
must follow theme changes automatically.
SSR-safe — the returned string is constructed from the contract and works identically in browser and server rendering. Returns an empty string only for paths that don’t resolve to a leaf in the contract.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
values
Section titled “values”values:
object
Defined in: src/hooks/useTheme/useTheme.types.ts:42
Resolved theme values — CSS variable values read from :root.
borderRadius
Section titled “borderRadius”borderRadius:
object
borderRadius.lg
Section titled “borderRadius.lg”lg:
string='6px'
borderRadius.md
Section titled “borderRadius.md”md:
string='4px'
borderRadius.none
Section titled “borderRadius.none”none:
string='0px'
borderRadius.sm
Section titled “borderRadius.sm”sm:
string='2px'
colors
Section titled “colors”colors:
object
colors.accent
Section titled “colors.accent”accent:
object
colors.accent.error
Section titled “colors.accent.error”error:
string='#f44336'
colors.accent.primary
Section titled “colors.accent.primary”primary:
string='#007acc'
colors.accent.secondary
Section titled “colors.accent.secondary”secondary:
string='#005a9e'
colors.accent.success
Section titled “colors.accent.success”success:
string='#4caf50'
colors.accent.warning
Section titled “colors.accent.warning”warning:
string='#ff9800'
colors.backdrop
Section titled “colors.backdrop”backdrop:
string='rgba(0, 0, 0, 0.6)'
colors.background
Section titled “colors.background”background:
object
colors.background.elevated
Section titled “colors.background.elevated”elevated:
string='#404040'
colors.background.inset
Section titled “colors.background.inset”inset:
string='rgba(0, 0, 0, 0.2)'
colors.background.primary
Section titled “colors.background.primary”primary:
string='#1a1a1a'
colors.background.secondary
Section titled “colors.background.secondary”secondary:
string='#2d2d2d'
colors.background.tertiary
Section titled “colors.background.tertiary”tertiary:
string='#3a3a3a'
colors.border
Section titled “colors.border”border:
object
colors.border.default
Section titled “colors.border.default”default:
string='#4a4a4a'
colors.border.error
Section titled “colors.border.error”error:
string='#f44336'
colors.border.focus
Section titled “colors.border.focus”focus:
string='#007acc'
colors.border.success
Section titled “colors.border.success”success:
string='#4caf50'
colors.surface
Section titled “colors.surface”surface:
object
colors.surface.active
Section titled “colors.surface.active”active:
string='#404040'
colors.surface.default
Section titled “colors.surface.default”default:
string='#2d2d2d'
colors.surface.disabled
Section titled “colors.surface.disabled”disabled:
string='#1f1f1f'
colors.surface.hover
Section titled “colors.surface.hover”hover:
string='#363636'
colors.surface.row
Section titled “colors.surface.row”row:
string='transparent'
colors.surface.rowHover
Section titled “colors.surface.rowHover”rowHover:
string='rgba(255, 255, 255, 0.03)'
colors.surface.whiteOverlay
Section titled “colors.surface.whiteOverlay”whiteOverlay:
string='rgba(255, 255, 255, 0.1)'
colors.text
Section titled “colors.text”text:
object
colors.text.disabled
Section titled “colors.text.disabled”disabled:
string='#555555'
colors.text.muted
Section titled “colors.text.muted”muted:
string='#888888'
colors.text.primary
Section titled “colors.text.primary”primary:
string='#ffffff'
colors.text.secondary
Section titled “colors.text.secondary”secondary:
string='#cccccc'
demo:
object
demo.canvas
Section titled “demo.canvas”canvas:
object
demo.canvas.gradientEnd
Section titled “demo.canvas.gradientEnd”gradientEnd:
string='#091010'
demo.canvas.gradientMid
Section titled “demo.canvas.gradientMid”gradientMid:
string='#031a1a'
demo.canvas.gradientStart
Section titled “demo.canvas.gradientStart”gradientStart:
string='#061f21'
shadows
Section titled “shadows”shadows:
object
shadows.focus
Section titled “shadows.focus”focus:
string='0 0 0 2px rgba(0, 122, 204, 0.4)'
shadows.lg
Section titled “shadows.lg”lg:
string='0 4px 8px rgba(0, 0, 0, 0.4)'
shadows.md
Section titled “shadows.md”md:
string='0 2px 4px rgba(0, 0, 0, 0.3)'
shadows.separatorBottom
Section titled “shadows.separatorBottom”separatorBottom:
string='0 1px 2px rgba(0, 0, 0, 0.18)'
shadows.separatorLeft
Section titled “shadows.separatorLeft”separatorLeft:
string='-1px 0 2px rgba(0, 0, 0, 0.18)'
shadows.separatorRight
Section titled “shadows.separatorRight”separatorRight:
string='1px 0 2px rgba(0, 0, 0, 0.18)'
shadows.sm
Section titled “shadows.sm”sm:
string='0 1px 2px rgba(0, 0, 0, 0.2)'
shadows.thumb
Section titled “shadows.thumb”thumb:
string='0 0 2px rgba(0, 0, 0, 0.5)'
shadows.xl
Section titled “shadows.xl”xl:
string='0 8px 16px rgba(0, 0, 0, 0.5)'
shell:
object
shell.dock
Section titled “shell.dock”dock:
object
shell.dock.borderBarBg
Section titled “shell.dock.borderBarBg”borderBarBg:
string='#2d2d2d'
shell.dock.borderBarSize
Section titled “shell.dock.borderBarSize”borderBarSize:
string='28px'
shell.dock.dropOverlay
Section titled “shell.dock.dropOverlay”dropOverlay:
string='rgba(0, 122, 204, 0.2)'
shell.dock.splitterColor
Section titled “shell.dock.splitterColor”splitterColor:
string='#4a4a4a'
shell.dock.splitterHoverColor
Section titled “shell.dock.splitterHoverColor”splitterHoverColor:
string='#007acc'
shell.dock.splitterSize
Section titled “shell.dock.splitterSize”splitterSize:
string='4px'
shell.dock.tabActiveBg
Section titled “shell.dock.tabActiveBg”tabActiveBg:
string='#1a1a1a'
shell.dock.tabActiveText
Section titled “shell.dock.tabActiveText”tabActiveText:
string='#ffffff'
shell.dock.tabBg
Section titled “shell.dock.tabBg”tabBg:
string='#2d2d2d'
shell.dock.tabHeight
Section titled “shell.dock.tabHeight”tabHeight:
string='28px'
shell.dock.tabHoverBg
Section titled “shell.dock.tabHoverBg”tabHoverBg:
string='#363636'
shell.dock.tabText
Section titled “shell.dock.tabText”tabText:
string='#cccccc'
shell.menuBar
Section titled “shell.menuBar”menuBar:
object
shell.menuBar.activeBg
Section titled “shell.menuBar.activeBg”activeBg:
string='#005a9e'
shell.menuBar.bg
Section titled “shell.menuBar.bg”bg:
string='#2d2d2d'
shell.menuBar.height
Section titled “shell.menuBar.height”height:
string='28px'
shell.menuBar.hoverBg
Section titled “shell.menuBar.hoverBg”hoverBg:
string='#363636'
shell.menuBar.shortcutText
Section titled “shell.menuBar.shortcutText”shortcutText:
string='#888888'
shell.menuBar.text
Section titled “shell.menuBar.text”text:
string='#ffffff'
shell.statusBar
Section titled “shell.statusBar”statusBar:
object
shell.statusBar.bg
Section titled “shell.statusBar.bg”bg:
string='#007acc'
shell.statusBar.height
Section titled “shell.statusBar.height”height:
string='22px'
shell.statusBar.heightMd
Section titled “shell.statusBar.heightMd”heightMd:
string='26px'
shell.statusBar.text
Section titled “shell.statusBar.text”text:
string='#ffffff'
shell.toolbar
Section titled “shell.toolbar”toolbar:
object
shell.toolbar.bg
Section titled “shell.toolbar.bg”bg:
string='#2d2d2d'
shell.toolbar.height
Section titled “shell.toolbar.height”height:
object
shell.toolbar.height.md
Section titled “shell.toolbar.height.md”md:
string='40px'
shell.toolbar.height.sm
Section titled “shell.toolbar.height.sm”sm:
string='32px'
shell.toolbar.separator
Section titled “shell.toolbar.separator”separator:
string='#4a4a4a'
spacing
Section titled “spacing”spacing:
object
spacing.lg
Section titled “spacing.lg”lg:
string='12px'
spacing.md
Section titled “spacing.md”md:
string='8px'
spacing.sm
Section titled “spacing.sm”sm:
string='4px'
spacing.xl
Section titled “spacing.xl”xl:
string='16px'
spacing.xs
Section titled “spacing.xs”xs:
string='2px'
spacing.xxl
Section titled “spacing.xxl”xxl:
string='24px'
spacing.xxxl
Section titled “spacing.xxxl”xxxl:
string='32px'
transitions
Section titled “transitions”transitions:
object
transitions.fast
Section titled “transitions.fast”fast:
string='100ms ease-out'
transitions.normal
Section titled “transitions.normal”normal:
string='200ms ease-out'
transitions.slow
Section titled “transitions.slow”slow:
string='300ms ease-out'
typography
Section titled “typography”typography:
object
typography.fontFamily
Section titled “typography.fontFamily”fontFamily:
object
typography.fontFamily.mono
Section titled “typography.fontFamily.mono”mono:
string='SF Mono, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
typography.fontFamily.sans
Section titled “typography.fontFamily.sans”sans:
string='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
typography.fontSize
Section titled “typography.fontSize”fontSize:
object
typography.fontSize.lg
Section titled “typography.fontSize.lg”lg:
string='14px'
typography.fontSize.md
Section titled “typography.fontSize.md”md:
string='12px'
typography.fontSize.sm
Section titled “typography.fontSize.sm”sm:
string='11px'
typography.fontSize.xl
Section titled “typography.fontSize.xl”xl:
string='16px'
typography.fontSize.xs
Section titled “typography.fontSize.xs”xs:
string='10px'
typography.fontSize.xxs
Section titled “typography.fontSize.xxs”xxs:
string='9px'
typography.fontWeight
Section titled “typography.fontWeight”fontWeight:
object
typography.fontWeight.medium
Section titled “typography.fontWeight.medium”medium:
string='500'
typography.fontWeight.normal
Section titled “typography.fontWeight.normal”normal:
string='400'
typography.fontWeight.semibold
Section titled “typography.fontWeight.semibold”semibold:
string='600'
typography.lineHeight
Section titled “typography.lineHeight”lineHeight:
object
typography.lineHeight.normal
Section titled “typography.lineHeight.normal”normal:
string='1.4'
typography.lineHeight.relaxed
Section titled “typography.lineHeight.relaxed”relaxed:
string='1.6'
typography.lineHeight.tight
Section titled “typography.lineHeight.tight”tight:
string='1.2'
zIndex
Section titled “zIndex”zIndex:
object
zIndex.base
Section titled “zIndex.base”base:
string='1'
zIndex.dropdown
Section titled “zIndex.dropdown”dropdown:
string='1000'
zIndex.modal
Section titled “zIndex.modal”modal:
string='1100'
zIndex.popover
Section titled “zIndex.popover”popover:
string='1000'
zIndex.tooltip
Section titled “zIndex.tooltip”tooltip:
string='1000'
variant
Section titled “variant”variant:
ThemeVariant
Defined in: src/hooks/useTheme/useTheme.types.ts:40
Current root-theme variant. See ThemeVariant for detection rules.