Themes
ThemeProvider
No summary has been written for ThemeProvider. Everything below is generated from the declaration shipped in 0.57.40 and describes the real contract.Public export
typescript
import { ThemeProvider } from '@happyvertical/smrt-ui/themes';- Import path
@happyvertical/smrt-ui/themes- Props
- 13
- Props described
- 13 of 13
- Bindable state
- 0
- Callback events
- 0
- Verified release
- 0.57.40
Props
NameTypeRequiredDescription
densityThemeConfig['density']NoDefault control target density for descendants; individual controls may override.contrastContrastPreferenceNoContrast preference. `auto` (default) follows `prefers-contrast: more`; `forced-colors: active` always wins. Persisted when set explicitly.presetThemePresetNoTheme preset to usecolorSchemeColorSchemeNoColor scheme preferenceprimaryColorstringNoPrimary accent color overrideborderRadiusThemeConfig['borderRadius']NoBorder radius preferenceoverridesRecord<string, string>NoCustom CSS variable overridespaintSurfacebooleanNoPaint the theme's background/color/font onto the wrapper. Set false when the host app owns its surface palette and only wants the CSS variables + scheme context — avoids specificity-fighting `.smrt-theme-root`.persistbooleanNoPersist preferences to localStoragestorageKeystringNoStorage key for persistenceinlineVariablesbooleanNoForce runtime generation of the full CSS variable set onto the wrapper's inline style (the legacy delivery path). Defaults to `true` for custom registered themes — they have no static stylesheet — and `false` for built-in presets, whose variables ship as static CSS (`themes/styles/<preset>.css`) selected by the `data-theme` / `data-color-scheme` attributes. Leave unset unless you cannot import the static stylesheet for a built-in preset.scope'document' | 'local'NoWhere the theme attributes land. `document` (the default for a root provider) also stamps `data-theme`, `data-color-scheme`, the `dark` class, `color-scheme`, `data-contrast`, `data-density` and `data-smrt-theme-changing` onto `<html>`. `local` themes only this provider's own wrapper and never touches the document. A provider nested inside another `ThemeProvider` is `local` by default, so an embedded widget cannot retheme its host page (#4485).childrenSnippetYesContentBindable state
This component has no bindable public state.
Callback events
This component declares no callback event props.