Skip to main content
Returns the mode the host is drawing in, as { mode: 'light' | 'dark' }.

Returns

mode

Remarks

Re-renders when the owner switches theme. The host’s CSS variables already follow the theme, so reach for this only where a component has to branch in code rather than restyle, such as a chart’s series colours. Throws TAP_OUTSIDE_HOST outside a mount.

Example