/ariakit

Toolkit for building accessible web apps with React

Primary LanguageTypeScriptMIT LicenseMIT

Ariakit

Toolkit for building accessible web apps with React.
Explore website »


NPM version GitHub Release Date GitHub Discussions
NPM downloads   GitHub Repo stars   Follow Ariakit on Twitter

Installation

npm:

npm i @ariakit/react

pnpm:

pnpm add @ariakit/react

Yarn:

yarn add @ariakit/react

Usage

import { createRoot } from "react-dom/client";
import * as Ariakit from "@ariakit/react";

function App() {
  const dialog = Ariakit.useDialogStore();
  return (
    <>
      <Ariakit.Button onClick={dialog.toggle}>Open dialog</Ariakit.Button>
      <Ariakit.Dialog store={dialog}>
        <Ariakit.DialogHeading>Welcome</Ariakit.DialogHeading>
        <Ariakit.DialogDescription>
          Welcome to Reakit!
        </Ariakit.DialogDescription>
      </Ariakit.Dialog>
    </>
  );
}

createRoot(document.getElementById("root")).render(<App />);

Attribution

Browser testing provided by

Contributing

Follow the instructions on the contributing guide.