Components
/
Accordion
Accordion
A vertically stacked set of interactive headings that each reveal a section of content.
You can track your order by logging into your account and visiting the "Orders" section. You'll receive tracking information via email once your order ships. For real-time updates, you can also use the tracking number provided in your shipping confirmation email.
Installation
Install the accordion component from shadcn/ui:
npx shadcn@latest add https://ui.saturation.io/r/accordion.jsonUsage
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion"
export default function AccordionDemo() {
return (
<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>
)
}Examples
Default
The default accordion with standard styling.
Split Style
Accordion with card-style items and custom icon rotation.
You can track your order by logging into your account and visiting the "Orders" section. You'll receive tracking information via email once your order ships. For real-time updates, you can also use the tracking number provided in your shipping confirmation email.
API Reference
Accordion
| Prop | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | - | Determines whether one or multiple items can be opened at the same time. |
| collapsible | boolean | false | When type is "single", allows closing content when clicking trigger for an open item. |
| defaultValue | string | string[] | - | The value of the item to expand when initially rendered. |
| value | string | string[] | - | The controlled value of the item to expand. |
| onValueChange | function | - | Event handler called when the expanded state of an item changes. |
On This Page
Deploy your Saturation UI app
Build beautiful, saturated interfaces with our component library.
Deploy to Vercel for the best performance and developer experience.