PACKAGE · MODAL & DIALOG

@ariakit/react

Toolkit for building accessible web apps with React

WEEKLY DOWNLOADS 982.7K
STARS 8.6K
FORKS 413
OPEN ISSUES 41
GZIP SIZE 60.9 kB
UNPACKED SIZE 1.0 MB
DEPENDENCIES 1
LAST UPDATED 5mo ago
DOWNLOAD TRENDS

@ariakit/react downloads — last 12 months

Download trends for @ariakit/react1 download series from Aug 2025 to Jul 2026. Use left and right arrow keys to inspect monthly values.01.1M2.3M3.4M4.6MAug 2025NovFebMayJul 2026
@ariakit/react
ABOUT @ARIAKIT/REACT

Ariakit is a toolkit designed to streamline the development of accessible web applications using React. It addresses the common challenges of building complex UI components that adhere to accessibility standards, providing pre-built, composable primitives that handle ARIA attributes, keyboard navigation, and focus management out-of-the-box.

This toolkit emphasizes a headless-first approach, allowing developers to retain full control over styling and markup while benefiting from robust accessibility logic. Its primary audience includes React developers who prioritize a11y and want to avoid reinventing the wheel for intricate components like modals, menus, and tooltips. The design goals are centered around developer experience, flexibility, and uncompromising accessibility.

Ariakit employs a hook-based API pattern, offering hooks such as `useDisclosure` for managing expanded/collapsed states in components like menus and accordions, and `useDialog` for modal UIs. These hooks expose state and event handlers that developers can bind to their custom elements, enabling declarative control over component behavior. This pattern promotes composition and allows for highly customized component structures.

The package integrates seamlessly into typical React workflows. It's framework-agnostic within the React ecosystem, meaning it works with various styling solutions, including CSS Modules, Styled Components, and utility-first CSS frameworks like Tailwind CSS. Its component primitives can be easily composed with other React libraries and patterns.

With a gzipped bundle size of 60.9 kB, Ariakit offers a comprehensive set of accessible components without imposing an excessive performance burden. While the unpacked size is 1.0 MB, the gzipped size indicates a focus on efficient delivery. The project is actively maintained, with version 0.4.36 and a significant weekly download count of 1.2M, suggesting a mature and widely used solution.

Developers should be aware that Ariakit is primarily a primitive toolkit rather than a full-fledged component library with opinionated styling. This means developers are responsible for the visual presentation and semantic markup of the components. While it provides extensive accessibility features, custom implementations might require careful integration to ensure all edge cases and specific ARIA requirements are met.

WHEN TO USE
  • When building interactive modal dialogs requiring robust keyboard and focus management using the `useDialog` hook.
  • When creating complex menu or dropdown components that need ARIA compliance and seamless keyboard navigation via `useMenu`.
  • To implement accessible accordion components where only one section is expanded at a time, leveraging `useDisclosure`.
  • When prioritizing WAI-ARIA standards and a11y for all interactive elements within your React application.
  • To achieve full styling and markup control while abstracting away complex accessibility logic with headless hooks.
  • When developing custom form elements or composite widgets that benefit from assistive technologies.
WHEN NOT TO USE
  • If you only require basic state management for simple UI elements, React's built-in `useState` and `useContext` are sufficient and lighter.
  • When you need a pre-styled, opinionated component library that dictates visual design and markup structure.
  • If your project has extremely strict bundle size constraints and the 60.9 kB gzipped size of Ariakit is prohibitive.
  • When building static websites or applications where dynamic UI interactions and ARIA attributes are not critical.
  • For basic button or link elements that do not require complex ARIA roles or advanced keyboard interaction patterns.
  • If you prefer a solution that provides all-encompassing UI components rather than composable accessibility primitives.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 2
@ariakit/react vs @headlessui/react ★ 28.7K · 5.7M/wk @ariakit/react vs @radix-ui/react-dialog ★ 19.1K · 57.8M/wk