Docs
Accordion

Accordion

Accordion seamlessly organizes information through a stack of interactive headings, each unlocking a dedicated section of content with a simple click. Elevating user experience, this component offers an intuitive interface, enabling users to effortlessly expand or collapse sections as they navigate through the content, providing a dynamic and user-friendly presentation of information.

Installation

yarn add @camped-ui/accordion

Usage

import {
  Accordion,
  AccordionContent,
  AccordionItem,
  AccordionTrigger,
} from "@camped-ui/accordion";
<Accordion type="single" collapsible>
  <AccordionItem value="item-1">
    <AccordionTrigger>Is it accessible?</AccordionTrigger>
    <AccordionContent>
      Yes. It adheres to the WAI-ARIA design pattern.
    </AccordionContent>
  </AccordionItem>
</Accordion>