Init Color Scheme Script API
View componentThe full prop reference for the Init Color Scheme Script component. Sets the initial color-scheme attribute before hydration.
Import
tsx
import { InitColorSchemeScript } from '@structyl/styled';Props
InitColorSchemeScript
Initial color mode script.
| Prop | Type | Default |
|---|---|---|
| storageKey# | stringLocalStorage key. | 'structyl-mode' |
| defaultMode# | 'light' | 'dark' | 'system'Initial mode fallback. | 'system' |
| attribute# | stringDocument attribute to set. | 'data-theme' |
Source code
If you didn't find what you need here, read the component implementation .