Skip to main content

Interface: ThemeHeadProps

Defined in: react.tsx:902

Props for the ThemeHead component.

Extends

Properties

defaultMode?

optional defaultMode?: ThemeMode

Defined in: react.tsx:904

Mode to use when no persisted value is found.

Default

'system'

nonce?

optional nonce?: string

Defined in: react.tsx:788

CSP nonce for the inline style tag.

Inherited from

ThemeStylesProps.nonce


storageKey?

optional storageKey?: string

Defined in: react.tsx:906

localStorage key for persistence. Must match ThemeProvider's storageKey.

Default

'tt-theme'

systemModeFallback?

optional systemModeFallback?: boolean

Defined in: react.tsx:795

Emit the @media (prefers-color-scheme) fallback block (themeId-less bundles only). Default true. Set false when the app's defaultMode is a fixed 'light'/'dark' rather than 'system'<ThemeHead> derives this automatically from its defaultMode.

Inherited from

ThemeStylesProps.systemModeFallback


theme

theme: ThemeBundle

Defined in: react.tsx:775

The theme bundle to generate CSS for.

Inherited from

ThemeStylesProps.theme


themeId?

optional themeId?: string

Defined in: react.tsx:786

Theme identifier for CSS scoping ([data-tt-theme="<themeId>"]).

Omit in the canonical 1-theme model — CSS targets :root and the alternate mode selector becomes :root[data-tt-mode="dark"]. No theme name repetition required.

Pass themeId only for multi-theme scenarios (Storybook, micro-frontends, apps with visual theme switching).

Inherited from

ThemeStylesProps.themeId