SourcingTheme
Sets light, dark, or system colors for any components placed inside.
ICU nurses in Texas
Ready
ICU nurses in Texas
Working
Example
<SourcingTheme mode="light">
<ChatHeader title="ICU nurses in Texas" running={false} />
</SourcingTheme>
<SourcingTheme mode="dark">
<ChatHeader title="ICU nurses in Texas" running />
</SourcingTheme>
Props
| Prop | Type | |
|---|---|---|
mode | 'light' | 'dark' | 'system' | Default system. |
tokens | ThemeTokens | Any set value replaces the built-in light or dark token. |
children | ReactNode | Components that should use those tokens. |
className | string | Added on the root element. |
style | CSSProperties | Added on the root element. |
themeVars(tokens) returns the same overrides as CSS variables (--asdk-bg, --asdk-surface, --asdk-fg, --asdk-muted, --asdk-line, --asdk-accent, --asdk-accent-fg, --asdk-user, --asdk-danger, --asdk-radius, --asdk-font, --asdk-shadow). useSourcingTheme() reads the mode and tokens from the nearest provider.
Load IBM Plex Sans and IBM Plex Mono in the host. The stylesheet falls back to system fonts. The product workbench is light; dark uses the same hues on a dark gray page.