Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ Although the color scheme is available immediately, this may change when not ove

### App-level overriding

`setColorScheme()` overrides the color scheme at the application level — it does not affect the system setting or other applications. Passing `'unspecified'` removes any override, restoring the system preference.
`setColorScheme()` overrides the color scheme at the application level — it does not affect the system setting or other applications. Passing `'auto'` removes any override, restoring the system preference.

```mermaid
flowchart TD
USC["useColorScheme()"] --> GCS["getColorScheme()"]
GCS --> DEC{App override?}
DEC -- "NO / reset via setColorScheme('unspecified')" --> SYS["System preference\n'light' or 'dark'"]
DEC -- "NO / reset via setColorScheme('auto')" --> SYS["System preference\n'light' or 'dark'"]
DEC -- "YES — setColorScheme('light' | 'dark')" --> OVR["'light' or 'dark' (static)"]

classDef fn fill:#dce8f8,stroke:#4a90d9,color:#1a1a1a
Expand Down Expand Up @@ -101,7 +101,7 @@ See also: [`useColorScheme`](usecolorscheme) (hook).
### `setColorScheme()`

```tsx
static setColorScheme('light' | 'dark' | 'unspecified'): void;
static setColorScheme('light' | 'dark' | 'auto' | 'unspecified'): void;
```

Forces the application to always adopt a light or dark interface style. The change applies to the application and all native elements within it (Alerts, Pickers, etc.).
Expand All @@ -112,7 +112,8 @@ Supported values:

- `'light'`: Apply light color scheme.
- `'dark'`: Apply dark color scheme.
- `'unspecified'`: Follow the system color scheme (removes any override).
- `'auto'`: Follow the system color scheme (removes any override).
- `'unspecified'` (**deprecated**): Follow the system color scheme (removes any override).

---

Expand Down