AccessKitProvider
Wraps your app and supplies accessibility state (reduced motion, high contrast, focus, spacing, font size, dyslexia font, color vision) to the tree. Applies preferences to the document via data-accesskit-* attributes and CSS variables. Required for useAccessKit, the Widget, and the Dev Tool.
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| defaultSettings | Partial<AccessKitSettings> | - | No | Initial values for preferences. Omitted keys use built-in defaults (e.g. reducedMotion: false, fontSize: 100). Use to ship with e.g. high contrast on or a different default font size. |
| storageKey | string | "accesskit:settings" | No | Key used to read and write settings in localStorage. Change it to namespace per app or avoid clashes. |
| persist | boolean | true | No | When true, user changes are saved to localStorage and restored on the next visit. Set to false to keep settings in memory only (e.g. kiosks or incognito flows). |
| onPersisterror | (error: unknown) => void | - | No | Called when writing settings to localStorage fails (e.g. quota exceeded, private browsing). Use to show a notification or log to an error service. In development, a console warning is also logged automatically. |
| focusColor | string | - | No | CSS color for the focus ring (e.g. " #0066cc"). Applied as --accesskit-focus-color on the document. Omit to use the default. |