Skip to main content

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​

PropType
mode'light' | 'dark' | 'system'Default system.
tokensThemeTokensAny set value replaces the built-in light or dark token.
childrenReactNodeComponents that should use those tokens.
classNamestringAdded on the root element.
styleCSSPropertiesAdded 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.