Display · Accordionstable
Accordion
Shows and hides sections of related content in a compact vertical stack. A stack of AccordionItems, each with a header trigger and a collapsible panel. Single or multiple open items, with hover, focus and disabled states.
Preview
#previewChange the options and the code follows. Show code opens the React snippet.
Yes. It follows the WAI-ARIA pattern.
Yes, from Settings › Billing at any time.
Refunds reach the card in 5–7 working days.
accordion-example.tsx
import { Accordion, AccordionItem } from "@blade-ai/weft/components/accordion";
export function Faq() {
return (
<Accordion>
<AccordionItem value="a" title="Is it accessible?">
Yes. It follows the WAI-ARIA pattern.
</AccordionItem>
<AccordionItem value="b" title="Can I change my plan later?">
Yes, from Settings › Billing at any time.
</AccordionItem>
</Accordion>
);
}All states
#all-statesClosed, open, hover, focus, disabled and composed, from the Accordion artboard.
Props
#propsRead from the component source. Booleans are is-prefixed. A star marks a required prop.
Accordion
Prop
Type
Default
Description
children *
ReactNode
—
AccordionItem children.
type
"single" | "multiple"
"single"
"single" keeps one item open at a time; "multiple" lets several stay open.
value
string[]
—
Controlled list of open item values. Use with onValueChange.
defaultValue
string[]
[]
Initial open items when uncontrolled.
onValueChange
(value: string[]) => void
—
Fires with the new list of open item values.
isCollapsible
boolean
true
In single mode, whether the open item can be closed again.
isDisabled
boolean
false
Disables every item.
AccordionItem
Prop
Type
Default
Description
value *
string
—
Unique value inside the accordion.
title *
ReactNode
—
Header text.
children
ReactNode
—
Panel content.
isDisabled
boolean
false
—
data-state
"hover" | "focus"
—
—
Usage
#usageShort rules for choosing and writing accordion.
Do
Use an accordion when people need only some of a long set of content, such as FAQs or grouped settings.
Write trigger titles that make sense on their own.
Use type="multiple" when people compare sections side by side.
Don't
Hide short content that people need anyway.
Put links or buttons inside the trigger.
Nest accordions inside accordions.
Accessibility
#accessibilityEach trigger is a button inside an h3. Arrow keys move between headers.
Keyboard
Key
Action
Enter / Space
Toggles the focused item.
↓ / ↑
Moves focus to the next / previous enabled header, wrapping.
Home / End
Moves focus to the first / last enabled header.
Tab
Moves focus through the page; headers are tab stops.
ARIA
Element
Role / attribute
When
Trigger
button · aria-expanded · aria-controls → panel
Always. Disabled items use the native disabled attribute.
Panel
role="region" · aria-labelledby → trigger
Hidden while closed.
Chevron
aria-hidden="true"
Decorative; the state is announced through aria-expanded.