React Aria, ported to Leptos

Accessible by default.
Styled by you.

leptos_aria brings React Aria's keyboard, focus, and screen-reader behaviour to Leptos and ships zero CSS. Every state is a data-* attribute, so Tailwind v4 styles it with the classes you already write.

cargo add leptos_aria

Read the guide View on GitHub

<button
  role="switch"
  aria-checked="false"
  data-state="unchecked">
The page has no idea how a switch should look; it only reads the state. Click it, or press Tab then Space.

Three moves, no stylesheet to fight

  1. Add the crate

    One facade crate re-exports every component, hook, and utility.

    $ cargo add leptos_aria
  2. Compose the parts

    Components handle roles, keyboard, and focus. You write markup and classes.

    view! {
      <AccordionItem key="faq".to_string()>
        <AccordionTrigger
          class="data-[state=open]:font-bold">
          "Is it accessible?"
        </AccordionTrigger>
        <AccordionPanel>"By default."</AccordionPanel>
      </AccordionItem>
    }
  3. Style the state

    Name the states once and every component speaks the same variants.

    @custom-variant open
      (&:where([data-state="open"]));
    
    <button class="open:bg-orange-500">

The hard parts, already written

63 components, 15 interaction hooks

Install Tailwind-styled versions with one command from the component registry.

Buttons & toggles
Button · AnchorButton · CustomButton · ToggleButton · ToggleGroup · Switch
Forms & fields
Form · TextField · TextArea · SearchField · NumberField · OneTimePasswordField · Checkbox · CheckboxGroup · RadioGroup · Slider
Collections & menus
ComboBox · SelectBox · ListBox · Menu · MenuTrigger · ContextMenu · Menubar · Tabs · TagGroup · Toolbar · Grid · Table · Tree
Overlays
Tooltip · Popover · Modal · Dialog · AlertDialog · HoverCard · Toast
Date & time
Calendar · DatePicker · DateField · DateRangePicker · TimeField
Colour
ColorField · ColorArea · ColorSlider · ColorWheel · ColorSwatch
Navigation & layout
Link · Breadcrumb · Pagination · Disclosure · Accordion · ScrollArea · Separator · AspectRatio
Feedback & files
Meter · ProgressBar · Avatar · DropZone · DraggableItem · FileTrigger
Text
Heading · Text · VisuallyHidden
Interaction hooks
use_press · use_focus · use_focus_within · use_hover · use_focusable · use_focus_ring · use_keyboard · use_long_press · use_move · use_drag · use_drop · use_scroll · use_overlay_dismiss · use_modal · use_autofocus · FocusManager

Own the styled layer

Like shadcn/ui: the CLI copies Tailwind-styled components into src/components/ui, wires up the modules and theme, and the files become yours. The headless crates stay underneath. Browse the components or read the CLI guide.

# once
$ cargo install leptos_aria_cli
$ leptos-aria init

# per component, and again after upgrades
$ leptos-aria add button dialog switch
$ leptos-aria diff

Readable by agents, too