$ show ariakit/ariakit
Ariakit is a headless, accessible UI component library for React and Solid, providing accessible, composable primitives (dialog, combobox, menu, tooltip, select, etc.) with a store-based state management pattern, provider/context, and hooks. It also includes a styled UI layer (Ariakit UI) with CSS variants. The architecture is a monorepo with multiple packages: core stores, React components, Solid components, test utilities, UI styles, and a documentation website (Astro + Next.js). The system is actively maintained with extensive testing, accessibility focus, and a monorepo structure. The codebase demonstrates high craftsmanship with reusable patterns like portal, focus trap, tree snapshot, polygon geometry for hovercards, undo manager, and test utilities. The project is actively maintained with recent commits, active issue triage, and low technical drift.
The LLM identified 6 files worth highlighting for reuse:
A generic portal component that renders children into a different DOM location using a portal element. It supports a `portalRef` for lifecycle callbacks and can be extracted as a standalone reusable component for any React project needing portal rendering.
A focus trap component that traps keyboard focus within a container, supporting nested traps and focus restoration. It can be extracted as a reusable focus trap component for any React project needing modal dialogs or custom focus management.
A utility for stacking attribute/style cleanup with disposal, supporting disposal functions and cleanup. It can be extracted as a reusable utility for any project needing to manage multiple attribute modifications with proper cleanup.
A utility for point-in-polygon and element polygon for hovercard sticky geometry. It can be extracted as a reusable geometry utility for any project needing to determine if a point is inside a polygon or compute element polygon.
An undo manager with group support and limit, allowing undo/redo of state changes. It can be extracted as a reusable undo manager for any project needing undo/redo functionality.
A test utility that simulates keyboard events (press, type, etc.) with realistic event properties. It can be extracted as a reusable test helper for any project needing keyboard event simulation in tests.