Introduction
PeakUI is a React component library built on React Aria Components and Tailwind CSS v4, styled with BEM classes and CSS custom properties.
PeakUI gives you accessible React components whose behavior comes from React Aria Components and whose styles are plain CSS on top of Tailwind CSS v4. The library ships 77 components with 543 examples in this documentation, and it is growing.
Why PeakUI?
- Accessible behavior – Focus management, keyboard interaction and ARIA wiring come from React Aria Components. The accessibility floor is WCAG 2.2 AA, including
forced-colorsmode. - Styles you can read – Every component is a BEM block in
@peakui/styles. There is no runtime styling and nothing hidden in JavaScript. - Themed with CSS variables – Colors, radius and typography are custom properties. Change one value and every component follows.
- Compound components – A component is a root plus named parts, such as
Fieldset.Legend. You compose the parts; the library does not assemble them for you. - Typed – Props, variants and render props are fully typed.
- React 19 –
refis an ordinary prop, and every component is a client component.
Packages
| Package | Purpose |
|---|---|
@peakui/react | The React components. Everything is exported from the package root. |
@peakui/styles | The stylesheet, the theme tokens and the variant functions. It has no React dependency. |
How a component is built
Each component is a thin styled composition over a React Aria primitive:
import {Button} from "@peakui/react";
<Button variant="secondary" onPress={() => save()}>
Save
</Button>variantandsizepick BEM modifier classes:.button--secondary,.button--md.onPress,isDisabledandisPendingare React Aria props.- The rendered element carries
data-slot="button"and state attributes such asdata-hoveredanddata-pressed, which the CSS styles against.
What PeakUI does not have
A few conventions from other libraries do not exist here, and it helps to know that early:
- No provider component. The theme is CSS, so there is nothing to wrap your app in.
- No
classNamesprop. Style a part by passingclassNameto that part. - No
asprop. Polymorphism goes through therenderprop. - No
colorprop onButton. The look is chosen withvariant. - No deep imports.
@peakui/react/buttondoes not resolve; import from@peakui/react.
Next steps
- Quick Start – install the packages and render a component.
- Design Principles – the ten decisions behind the API.
- Theming – the tokens and how to change them.
- Styling – the ways to restyle a component.
- Composition – compound parts, the
renderprop and variant functions. - All Components