Umbra UI

Accordion

Stacked sections that expand and collapse.

Staticimport { Accordion } from 'umbra-ui'

Props

Accordion

PropTypeDefaultDescription
asChild boolean—

AccordionItem

PropTypeDefaultDescription
asChild boolean—

AccordionContent

PropTypeDefaultDescription
asChild boolean—

Usage notes

type="single" keeps one item open (add collapsible to allow closing it); type="multiple" lets any number stay open. Each AccordionItem needs a unique value.

Accessibility

  • Each trigger is a button inside a heading, with aria-expanded and aria-controls.
  • Arrow keys move between triggers; Home and End jump to the first and last.
  • The open and close animation is skipped under reduced motion.

Import

import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app