interface ThemeChoiceSpec

Passed to useThemeChoice by ThemeProvider, as a constant: one for the style, one for the scheme.

Type Parameters

T extends string

Properties

storageKey: string

The localStorage key, which index.html's script reads too.

allowed: readonly T[]
setting: "style" | "colorScheme"

The account setting that holds the choice.

What applies when nobody chose.

attribute: string

The root element's attribute the stylesheets key on.

The value the stylesheets draw without the attribute, which is then left out.

Usage

import { type ThemeChoiceSpec } from "src/hooks/theme/useThemeChoice.ts";