Zephora UI

Navigation

Accordion

Vertically stacked disclosure sections following the WAI-ARIA accordion pattern. Single or multiple items may be open at once.

Import

import { Accordion, AccordionItem } from "@zephora/react";

Examples

Single, collapsible

In single mode only one item opens; `collapsible` also allows closing it again.

Orders ship within 2 business days.

Multiple

`type="multiple"` lets several items stay open.

Colors, spacing and typography scales.

Light, dark and custom themes.

Controlled

In single mode `onValueChange` receives a string (empty when everything is closed).

Yes, MIT licensed.

Open: faq-1

API

Accordion props

PropTypeDefaultDescription
type"single" | "multiple""single"Whether one or several items may be open at once.
collapsiblebooleanfalseIn single mode, allows closing the open item.
valuestring | string[]Controlled open value(s).
defaultValuestring | string[]Initially open value(s) (uncontrolled).
onValueChange(value: string | string[]) => voidReceives a string in single mode and a string[] in multiple mode.
unstyledbooleanfalseHeadless mode — inherited by items.

AccordionItem props

PropTypeDefaultDescription
value *stringValue identifying this item in the accordion state.
title *ReactNodeHeader content rendered inside the trigger button.
disabledbooleanDisables the trigger.
unstyledbooleanOverrides the inherited headless mode.

Keyboard

KeyAction
Enter / SpaceToggles the focused section.
ArrowDown / ArrowUpMove focus to the next / previous section header.
Home / EndFocus the first / last section header.