v0.2.2 — React + Web Components
Accessible components
that just work.
React primitives and Web Components with keyboard navigation, ARIA, screen readers, and focus management built in. Zero configuration. Full control.
Why compa11y?
Most component libraries treat accessibility as an afterthought. compa11y makes it the foundation.
Unstyled by Default
No fighting CSS overrides. Bring your own design system, Tailwind, or CSS-in-JS. compa11y provides structure and behavior, you control the look.
Dev Warnings
Forgot an aria-label? Missing a Dialog title? compa11y warns you in the console during development so you catch accessibility issues before they ship.
React + Web Components
Unlike Radix or Headless UI, compa11y gives you Web Components too. Use the same accessible primitives in React, vanilla JS, or any framework via CDN.
Keyboard First
Every component supports full keyboard navigation out of the box. Arrow keys, Tab, Enter, Escape, Home, End, and type-ahead all work as users expect.
Screen Reader Ready
Proper ARIA roles, live regions, and focus management ensure your components are announced correctly to assistive technologies.
Zero Configuration
Install, import, render. Accessibility is built into the component architecture, not bolted on through configuration or manual prop passing.
Three packages, one mission
Pick the package that fits your stack. They all share the same accessibility primitives.
@compa11y/react
React components and hooks for building accessible UIs. Compound component patterns with full TypeScript support.
npm install @compa11y/react@compa11y/core
Framework-agnostic primitives. Focus traps, keyboard managers, screen reader announcers, and ARIA helpers.
npm install @compa11y/core@compa11y/web
Web Components for any framework or vanilla HTML. Drop a script tag and get accessible components instantly.
<script src="unpkg.com/@compa11y/web">Get started in seconds
Install, import, and build accessible UIs immediately.
npm install @compa11y/reactimport { useState } from "react";
import {
Button, Dialog, Input, Select, Switch,
Tooltip, Heading, Text, Alert
} from "@compa11y/react";
function App() {
const [open, setOpen] = useState(false);
const [darkMode, setDarkMode] = useState(false);
return (
<>
<Heading level={1}>My Accessible App</Heading>
<Text color="muted">Built with compa11y — accessibility included.</Text>
<Alert type="info">All components below are fully keyboard and screen reader accessible.</Alert>
<div style={{ display: "flex", gap: "8px", alignItems: "center", marginTop: "16px" }}>
<Tooltip label="Opens a confirmation dialog">
<Button onClick={() => setOpen(true)}>Open Dialog</Button>
</Tooltip>
<Switch checked={darkMode} onCheckedChange={setDarkMode}>
Dark mode
</Switch>
</div>
<Dialog open={open} onOpenChange={setOpen}>
<Dialog.Title>Create Account</Dialog.Title>
<Dialog.Description>Fill in your details below.</Dialog.Description>
<Input label="Full name" required />
<Input label="Email" type="email" hint="We'll never share your email." required />
<Select
options={[
{ value: "dev", label: "Developer" },
{ value: "design", label: "Designer" },
{ value: "pm", label: "Product Manager" },
]}
placeholder="Select your role"
/>
<Dialog.Actions>
<Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
<Button onClick={() => setOpen(false)}>Create</Button>
</Dialog.Actions>
</Dialog>
</>
);
}43 accessible components
Form controls, overlays, data display, navigation, and feedback — all with full keyboard support and screen reader compatibility.