When to use it. A vertical stack of collapsible sections. Each section is a group whose label is the header and whose grid of children is the expandable body. In single mode the open section index is the control value (so it syncs and fires actions); in multi mode sections open independently.
Type
accordion
Also titled
Accordion
Default size
3 rows × 2 columns
Symbol
list.bullet.below.rectangle
Docs
Docs complete
Search for it as
collapse
expand
section
fold
disclosure
faq
Rendered by the app
Fields
6 fields you can set on a accordion control. Every control also takes the shared fields (id, position, span, sync, action).
Fields
Field
Type
Default
What it does
Open modeaccordionMode
choiceone of 2
single
Whether opening one section closes the others
Single keeps one section open at a time; multi lets any number stay open together.
singledefaultopening a section closes the one that was open
multievery section opens and closes on its own
expandedIndexexpandedIndex
number
0
Which section is open when the layout appears
Opens the section at this position on load, counting from 0; -1 starts with every section closed.
ChevronshowChevron
on / off
true(on)
The small arrow beside each heading
Shows or hides the arrow at the end of each heading; hidden leaves just the heading text.
panelspanels
object
—
The headings and the content under each
Each entry becomes one heading row that expands to show its own controls.
containerAnimationcontainerAnimation
object
—
How the sections animate when opening or closing
Tunes the spring and speed of expanding and collapsing, e.g. profile smooth or duration 0.3 seconds.
defaultValuedefaultValue
numberstep 1
—
The section that starts open
Opens the section at this position on load (from 0) and wins over the open-on-load index; -1 starts all closed.
Theme fields
Restyle one control by setting these in its theme object; a layout's theme sets them for every control.
Theme fields
Field
Type
Default
What it does
surfacePrimarytheme.surfacePrimary
color
#FFFFFF0F
The fill behind each section card
Paints every section card in this color, including its transparency.
accentColortheme.accentColor
color
#667eea
The color of the arrows
Tints the chevron on every heading in this color.
Frosted glasstheme.blurEnabled
on / off
true(on)
How heavy the outline is
Sets the outline thickness from 0 (none) to 5 points.
Card spacingtheme.cardPadding
number0–32 ptstep 1
12
Breathing room inside each section
Adds 0 to 32 points between a section card edge and its content.
Corner roundnesstheme.cornerRadius
number0–30 ptstep 1
12
The color of the heading words
Paints the section headings and default text in this color.
Emits and receives
What this control sends when you use it, and what it can show or follow when data arrives.
Emits
Emits
Sends
When
Type
What it sends
When you open or close a sectionvalue
tap
number
the position of the section you opened, counting from 0 (-1 when you collapse it)
In multi mode sections open independently and the value is only the last one you toggled
Example: 1
Receives
Receives
Takes
From
Type
What it does
valuefollow
hub, mqtt, http, store, default
number
the position of the section to open, counting from 0 (-1 closes all)
that section opens (in single mode, stepping through the sections in between); multi mode keeps its own open set
Example: 1
Examples
4 examples, each one a control you can paste into a layout.
Shows single mode with a spring animation: only one section stays open and the open index is the control value. Intended effect: tapping Network closes Display and opens Network.
Shows multi mode, no chevron and all sections starting closed. Intended effect: each question opens on its own and several answers can stay open at once, with plain headings.
Shows the action fired on every toggle and a sync that opens a section from the server. Intended effect: tapping a heading sends its index (-1 when collapsing) and a broadcast scene message opens the matching section on the phone.