Components

Accordion

A grouped disclosure pattern for setup steps, FAQs, and stacked sections that expand in place.

Tap to show a QR code for the Expo showcase deep link. The web preview below runs in the browser.

Loading...

Installation

Install the registry item directly, then add any package dependencies if you are setting the component up manually.

1

Install the component

Run the registry command below to add accordion to your project.

watermelon add accordion
2

Import the component

Import Accordion from your local UI registry output.

Import

import { Accordion } from "@/components/ui/accordion";

Import

Import

import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";

Usage

Use accordion items to reveal grouped content one section at a time.

Loading...

API Reference

proptypedefaultdescription
type"single" | "multiple""single"Controls whether one or many items can stay open.
value / defaultValuestring | string[]-Sets the open item or items.
onValueChange(value: string | string[]) => void-Called when the expanded item set changes.