React SDK
The React SDK exports A11yProvider, useA11y(), and pre-built UI components. It wraps the vanilla SDK in a React context so all components in your tree can access the accessibility state without prop-drilling.
1. Wrap your app with A11yProvider
Place A11yProvider at the root of your application (or around the section that needs accessibility support). Pass your API key and the studentId of the currently logged-in user.
Note
When
studentId is provided, A11yProvider automatically loads the student's accessibility profile on mount and applies their saved feature settings to the DOM. If studentId is omitted, features can still be toggled manually but no profile is persisted.2. Use the useA11y() hook
Call useA11y() from any component inside the provider to access the full accessibility API.
A11yConfig options
All options passed to A11yProvider:
| Prop | Type | Default | Description |
|---|---|---|---|
| apiKey | string | — | Required. Your tenant API key. |
| studentId | string | undefined | External user ID to load/save a profile. |
| apiUrl | string | https://api.angstroma.com/api/v1 | Override for custom or staging deployments. |
| tenant | string | undefined | Tenant slug. Resolved from API key if omitted. |
| locale | string | "en" | UI locale. Supported: en, es, fr, de, pt, ja, ko, zh, ar, hi, si. |
| autoLoadProfile | boolean | true | Load the student profile on mount. |
| trackUsage | boolean | true | Send feature activation events to analytics. |
| container | string | HTMLElement | undefined | Scope CSS modifications to this element. |
| planFeatures | string[] | undefined | Feature codes unlocked by plan. Omit to allow all. |
Pre-built components
Import ready-made components from the SDK:
AI content transforms
Use AI functions directly in your components. These call the Angstroma API and count against your plan's AI call quota.
Important
AI functions require a plan with AI credits. Calls that exceed the quota return a 429 error. Catch
A11yApiError with status === 429 and show a graceful fallback.