Skip to content

applyTheme()

@blobs/sdk v0.1.0


@blobs/sdk / utils/themeUtils / applyTheme

applyTheme(theme): void

Defined in: utils/themeUtils.ts:22

Apply a theme to the document root.

Accepts either a ThemeConfig object or the ID of a built-in preset (resolved via getPredefinedTheme). On success, the theme ID is persisted to localStorage for restoration on next load.

Parameters

theme

string | ThemeConfig

A theme config or a predefined theme ID.

Returns

void