Local guide ↗ import { Accordion } from "bits-ui"

Single

type="single" keeps at most one section open, with animated height via --bits-accordion-content-height

Multiple, controlled

type="multiple" with bind:value — external buttons drive the same state

1 open

Two-way bound state for shipping. The buttons above write straight into the same $state array the accordion reads.

type is required and switches the shape of value: a string for "single", a string array for "multiple". Because a bindable prop has to be destructured, wrapper components typically spread {...restProps as any} to escape the discriminated union.