Accordion native
Collapsible sections; the child at index i is the body of item i.
Preview
Loading the renderer…
createSurface + updateComponents, A2UI v0.9.
json
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "preview",
"catalogId": "https://ui.exponential.at/catalogs/core/v1"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "preview",
"components": [
{
"id": "root",
"component": "Stack",
"direction": "vertical",
"align": "stretch",
"children": [
"example"
]
},
{
"id": "example",
"component": "Accordion",
"items": [
{
"title": "Details",
"value": "details"
}
],
"type": "single",
"value": "details",
"children": [
"c0-p"
]
},
{
"id": "c0-p",
"component": "Text",
"text": "Created 2 days ago by Ada; 3 comments.",
"variant": "body"
}
]
}
}
]This surface through a MemoryTransport. Install and transports: React guide.
This surface through a MemoryTransport. Install and transports: SwiftUI guide.
This surface through a MemoryTransport. Install and transports: Compose guide.
This surface through a MemoryTransport. Install and transports: gpui guide.
Platforms




View exponential-ui-accordion, painted by each native renderer.
Variants
type · singletype · multipleProps
| Prop | Type | Default | Description |
|---|---|---|---|
itemsrequired | [accordionItem] | – | The section headers in order. |
type | single | multiple | "single" | One section open at a time, or any number. |
valuebind | string | – | The open section's value (comma-joined when multiple); bind it. |
Events and slots
| Name | Kind |
|---|---|
on.change | event: runs an action |
Accessibility
- Role
group- Semantics
- headers = buttons with aria-expanded controlling regions
| Keys | Action |
|---|---|
| EnterSpace | toggle the focused section |
| ArrowDownArrowUp | next/previous header |
| HomeEnd | first/last header |
Theming
- Recipe parts
Accordion/rootAccordion/itemAccordion/triggerAccordion/contentAccordion/count- Keyed by
type:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover