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
@marktiderman/genesis-uiimport { AppearanceProvider } from "@marktiderman/genesis-ui";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.
| Prop | Type | Default | Description |
|---|---|---|---|
| brand* | CanonicalBrand | — | The brand object to theme this subtree with. |
| defaultMode | enum | — | Initial uncontrolled mode (used only when `mode` prop is omitted). Defaults to `"system"`. |
| mode | enum | — | 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). |
| syncDocument | boolean | true | Also set `.dark` on `<html>` for the appearance showing, as AppShell's toggle does, so Tailwind's `dark:` and portalled menus follow it. Default true. |