PeakUI

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-colors mode.
  • 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 – ref is an ordinary prop, and every component is a client component.

Packages

PackagePurpose
@peakui/reactThe React components. Everything is exported from the package root.
@peakui/stylesThe 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>
  • variant and size pick BEM modifier classes: .button--secondary, .button--md.
  • onPress, isDisabled and isPending are React Aria props.
  • The rendered element carries data-slot="button" and state attributes such as data-hovered and data-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 classNames prop. Style a part by passing className to that part.
  • No as prop. Polymorphism goes through the render prop.
  • No color prop on Button. The look is chosen with variant.
  • No deep imports. @peakui/react/button does not resolve; import from @peakui/react.

Next steps

On this page