Accordion
StorybookA vertically stacked set of interactive headings that each reveal a section of content. Demonstrated below in all 3 state modes plus push_event commands.
Client-only
No server events. The accordion toggles purely via JavaScript — zero latency.
Multiple
With type="multiple", several items can be open
at the same time. No collapsible attr needed —
items toggle independently.
Hybrid
JS toggles instantly for responsiveness, then pushes the event to the server. The event log below updates via LiveView.
Server-controlled
The server owns the state. Use the buttons below to open items externally.
The accordion reflects the server's value assign.
""
Push Event (Server → Client)
The server pushes commands to a client-mode accordion via
push_event/3.
The accordion has no value or
on_value_change — it's client-only,
but the server can still command it.