defmodule PyrauiWeb.DocsLive.AccordionDocs do use PyrauiWeb, :html def render(assigns) do ~H"""
Collapsible sections with buttery-smooth transitions that keep dense information organised. Perfect for FAQs, advanced settings, or progressive disclosure flows.
Compose rich content within each item and decide which panels open by default for a guided story.
Focus on progressive disclosure to keep your surfaces calm. Use accordions to tuck away secondary controls while keeping essential actions visible.
<:item id="accordion-content" title="Content patterns" open={false}>The component ships with subtle easing to avoid jarring jumps. Extend with Tailwind transitions for deeper motion stories.
<.accordion class="space-y-3">
<:item id="accordion-design" title="Design strategy" open={true}>
...
</:item>
<:item id="accordion-content" title="Content patterns" open={false}>
...
</:item>
</.accordion>
Small heuristics to keep accordion experiences intuitive and accessible.
Drive the accordion with expressive slot attributes while inheriting accessible semantics out of the box.
| Prop | Type | Default | Description |
|---|---|---|---|
| item (slot) | slot | required |
Accordion rows with id, title, and optional open.
|