Trevixal API
    Preparing search index...

    Interface ThemeControllerOptions

    interface ThemeControllerOptions {
        mode?: ThemeMode;
        onChange?: (state: { mode: ThemeMode; preset: string | null }) => void;
        preset?: string | null;
        presets?: readonly ThemePreset[];
        targets?: readonly HTMLElement[];
    }
    Index
    mode?: ThemeMode

    Starting mode; system by default.

    onChange?: (state: { mode: ThemeMode; preset: string | null }) => void

    Called after every change, for a host that persists the choice.

    preset?: string | null

    Starting preset name, or null for the plain light/dark palette.

    presets?: readonly ThemePreset[]
    targets?: readonly HTMLElement[]

    Elements the theme attributes are written to; the <html> root by default.