Accordion
Open one answer at a time — or several (Radix Accordion).
Preview
A bed, a common room and a way to travel. 111 Zostels in 80+ destinations across India, Nepal and Thailand, since 2013. Travel like a local — a friend in every corner.
Usage
tsx
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "zostel-ui";
<Accordion type="single" collapsible>
<AccordionItem value="what">
<AccordionTrigger>What is Zostel?</AccordionTrigger>
<AccordionContent>
111 Zostels in 80+ destinations across India, Nepal and Thailand, since 2013.
</AccordionContent>
</AccordionItem>
</Accordion>Accordion
| Prop | Type | Default | Description |
|---|---|---|---|
type | "single" | "multiple" | — | One open at a time, or many. |
collapsible | boolean | false | With type="single": the open one can close. |
value / defaultValue | string | string[] | — | The open item(s). |
onValueChange | (value) => void | — | Called when it changes. |
typeType:
"single" | "multiple"Default: —
One open at a time, or many.
collapsibleType:
booleanDefault:
falseWith type="single": the open one can close.
value / defaultValueType:
string | string[]Default: —
The open item(s).
onValueChangeType:
(value) => voidDefault: —
Called when it changes.