Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also
accepted unless noted.
Accordion.Root
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
value | AccordionValue | undefined | — | Controlled value. |
defaultValue | AccordionValue | — | Uncontrolled initial value. |
onValueChange | ((value: AccordionValue) => void) | undefined | — | Event handler called when the value changes. |
multiple | boolean | — | — |
disabled | boolean | false | Whether the control ignores user interaction. |
orientation | AccordionOrientation | 'horizontal' | — |
children | Snippet<[{ openValues: string[] }]> | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-disabled | Present when the part is disabled. |
data-orientation | The orientation of the component. |
Accordion.Header
Extends HTML element attributes.
| Property | Type | Default | Description |
|---|
render | string | — | HTML element tag to render instead of the default host element. |
children | Snippet | — | Content rendered inside the part. |
Accordion.Item
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
value | string | — | Controlled value. |
disabled | boolean | false | Whether the control ignores user interaction. |
children | Snippet<[{ open: boolean; disabled: boolean }]> | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-closed | Present when the part is closed. |
data-disabled | Present when the part is disabled. |
data-open | Present when the part is open. |
Accordion.Panel
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
keepMounted | boolean | — | — |
role | string | undefined | — | — |
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-closed | Present when the part is closed. |
data-ending-style | Present while the exit animation can run. |
data-open | Present when the part is open. |
data-starting-style | Present while the enter animation can run. |
Accordion.Trigger
Extends button HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-disabled | Present when the part is disabled. |
data-panel-open | Present on the element when applicable. |