Skip to content
NEWSADA Title II web deadlines: April 24, 2026 (50k+ pop) · April 26, 2027 (under 50k) — Is your site compliant?ADA Title II: April 2026 & 2027 deadlinesLearn more →

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-sdk

What's included

ExportDescription
A11yProviderReact context provider — wraps your app, loads profile automatically
useA11y()React hook — access enable/disable/toggle/applyPreset from any component
A11yToolbarPre-built React toolbar component
A11yReaderText-to-speech reader component
A11yQuizToolbarAccessibility toolbar optimised for quiz/assessment UIs
A11yPresetBarHorizontal preset picker component
AngstromaA11yVanilla JS class — full SDK without React dependency
A11yClientLow-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.