Type

Theme types

Unions exported from ngwr/theme — the palette names every colored component accepts, and the mode values WrTheme works with.

Import

import type { WrColor, WrThemeMode, WrResolvedTheme } from 'ngwr/theme';

WrColor

The palette union behind every [color] input. Values map 1:1 to the --wr-color-* custom properties, so a custom palette automatically flows into components.

const accent: WrColor = 'primary';
primarysecondarysuccesswarningdangerinfolightmediumdark

API

NameDescriptionTypeDefault
WrColorPalette names accepted by every [color] input.'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'light' | 'medium' | 'dark'
WrThemeModeWhat the consumer asks WrTheme for — auto follows the OS.'light' | 'dark' | 'auto'
WrResolvedThemeWhat is actually applied to the DOM after resolving auto.'light' | 'dark'

See also