Skip to main content

Interface: CssVarsOptions

Defined in: adapters/toCssVars.ts:11

Options for toCssVars().

Properties

colorScheme?

optional colorScheme: "light" | "dark" | "light dark"

Defined in: adapters/toCssVars.ts:34

Sets the color-scheme CSS property in the generated block. Helps native elements (inputs, scrollbars) respect the active mode. Differs from mode in that: The mode determines when/where the block applies (selector). The colorScheme determines how the browser renders native components within this block. They usually match, but they don't need to match in advanced scenarios.


mode?

optional mode: "light" | "dark"

Defined in: adapters/toCssVars.ts:21

Mode for scoping. Adds [data-tt-mode="<mode>"] to the selector. Only effective when themeId is also set.


selector?

optional selector: string

Defined in: adapters/toCssVars.ts:25

Custom CSS selector override. Takes precedence over themeId/mode.


themeId?

optional themeId: string

Defined in: adapters/toCssVars.ts:16

Theme identifier for scoping. Generates [data-tt-theme="<themeId>"] selector. When omitted, uses :root.