Skip to content

applyTheme

applyTheme(element, theme): () => void

Defined in: theme.ts:52

Write tokens onto an element.

Returns a function restoring the previous values, so a component that unmounts mid-stream does not leave a half-applied theme behind on a long-lived host element.

HTMLElement

ResolvedTheme | null

() => void