Skip to content

theme

@fungi.computer/stipe


@fungi.computer/stipe / theme

ThemeListener = (theme) => void

Receives the current theme after a matching attribute mutation.

string

void

applyTheme(theme, root?): void

Set the Daisy theme name. Persistence and application policy stay with the host.

string

HTMLElement

void


getTheme(root?): string | null

Read the Daisy theme name from the root element, when available.

HTMLElement

string | null


subscribeTheme(listener, root?): () => void

Subscribe to root data-theme mutations without owning browser policy.

ThemeListener

HTMLElement

() => void