Skip to main content

React Installation

Installation

Install the React package using your preferred package manager:

npm install @a13y/react
# or
yarn add @a13y/react
# or
pnpm add @a13y/react

Peer Dependencies

Make sure you have React 18+ installed:

npm install react@^18.0.0 react-dom@^18.0.0

Usage

Import components from the package:

import { AccessibleButton, AccessibleModal } from '@a13y/react';

function App() {
  return (
    <AccessibleButton onClick={() => console.log('Clicked!')}>
      Click me
    </AccessibleButton>
  );
}

TypeScript Support

@a13y/react is written in TypeScript and includes full type definitions out of the box.