Genesis
@beta

AppearanceProvider

The person's **appearance** (light, dark or system), by its glossary name: `GenesisThemeProvider` fed from the person's appearance preferences. Inside an `AppearancePreferencesProvider` (genesis-core) it shows their appearance in the written order (the app's lock, the person, the organization's default, the theme's) and saves their changes (`useTheme().setMode`) there. Outside one it is `GenesisThemeProvider` as it was, with the same props.

packages/ui/src/themes/appearance.tsx

Import
Subpath export: @marktiderman/genesis-ui
import { AppearanceProvider } from "@marktiderman/genesis-ui";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

AppearanceProvider

The person's **appearance** (light, dark or system), by its glossary name: `GenesisThemeProvider` fed from the person's appearance preferences. Inside an `AppearancePreferencesProvider` (genesis-core) it shows their appearance in the written order (the app's lock, the person, the organization's default, the theme's) and saves their changes (`useTheme().setMode`) there. Outside one it is `GenesisThemeProvider` as it was, with the same props.

PropTypeDefaultDescription
brand*CanonicalBrand—The brand object to theme this subtree with.
defaultModeenum—Initial uncontrolled mode (used only when `mode` prop is omitted). Defaults to `"system"`.
modeenum—Color mode. Uncontrolled when omitted (defaults to `"system"`); the provider tracks state internally and exposes `setMode` via `useTheme()`. Pass an explicit value to control the mode externally; in that case `setMode` becomes a no-op (with dev-only warning).
onModeChange((mode: ResolvedThemeMode) => void)—Notified when the resolved mode changes (controlled or uncontrolled).
onModeSelect((mode: ThemeMode) => void)—Called with the person's new appearance whenever `setMode` is asked for one (a toggle, a picker), controlled or not: where to save it. A controlled provider with it doesn't warn; its owner saves the choice and passes it back as `mode` (genesis-ui's `AppearanceProvider` does this with the person's appearance preferences).
syncDocumentbooleantrueAlso set `.dark` on `<html>` for the appearance showing, as AppShell's toggle does, so Tailwind's `dark:` and portalled menus follow it. Default true.