JavaScript SDK
The @angstroma/a11y-sdk npm package gives you programmatic control over every accessibility feature — profiles, presets, AI transforms, and usage analytics — from any JavaScript environment.
When to use the SDK vs script tag
The script tag is the fastest path to adding the Angstroma accessibility toolbar to any site. No build step required.
The npm SDK is for teams who need deeper integration: building custom UI, programmatically applying presets per student, using AI content transforms in your own components, or building headless (no toolbar) implementations.
Script tag
Drop-in toolbar widget. No build step. Best for static sites, CMS platforms, and quick installs.
React SDK
A11yProvider + useA11y() hook. Context-driven, React 18+ compatible.Vanilla JS SDK
AngstromaA11y class. Works in any framework or plain HTML. No React dependency.Installation
Install from npm:
npm install @angstroma/a11y-sdkWhat's included
| Export | Description |
|---|---|
| A11yProvider | React context provider — wraps your app, loads profile automatically |
| useA11y() | React hook — access enable/disable/toggle/applyPreset from any component |
| A11yToolbar | Pre-built React toolbar component |
| A11yReader | Text-to-speech reader component |
| A11yQuizToolbar | Accessibility toolbar optimised for quiz/assessment UIs |
| A11yPresetBar | Horizontal preset picker component |
| AngstromaA11y | Vanilla JS class — full SDK without React dependency |
| A11yClient | Low-level HTTP client (X-Api-Key auth) |
| generateAltText() | AI: generate alt text from image URL |
| simplify() | AI: simplify text to target reading level |
| rephrase() | AI: rephrase question/answer pair |
| getHints() | AI: get scaffolded hints for a question |
| extractVocabulary() | AI: extract vocabulary words from text |
API base URL
All SDK methods send requests to https://api.angstroma.com/api/v1 by default. Override with the apiUrl config option for self-hosted or staging environments.