Sourceful Energy

Accordion

A vertically stacked set of interactive headings that reveal or hide content.

Installation

import {
  Accordion,
  AccordionItem,
  AccordionTrigger,
  AccordionContent,
} from "@sourceful-energy/ui"

Usage

Examples

FAQ

Multiple Open

Default Open

This item is open when the page loads.

Props

PropTypeDefaultDescription
type"single" | "multiple""single"Whether one or multiple items can be opened at once.
valuestring | string[]-The controlled value of the opened item(s).
defaultValuestring | string[]-The default opened item(s) when uncontrolled.
collapsiblebooleanfalseWhen type is 'single', allows closing all items.

Accessibility

  • Built on Radix UI Accordion for full accessibility
  • Keyboard navigation (Arrow keys, Home, End)
  • WAI-ARIA accordion pattern
  • Proper focus management