{"name":"accordion","title":"Accordion","description":"","kind":"component","category":"display","status":"beta","props":{"items":{"type":"array","description":"The items in order: { value, label, meta?, detail?, disabled? }. Free content in an item's body, after the detail text: React, the item's content (a node); Vue, the content slot; Svelte, the content snippet (both receive the item)."},"value":{"type":"array","model":true,"default":[],"description":"The values of the open items. React: value / defaultValue / onValueChange; Vue: v-model:value; Svelte: bind:value."},"multiple":{"type":"boolean","default":false,"description":"Several items may be open at once. Without it, opening one closes the other."},"collapsible":{"type":"boolean","default":true,"description":"The open item closes when its trigger is pressed again. false: one item always stays open once one has been opened (single mode only)."},"variant":{"type":"enum","values":["plain","card"],"default":"plain","description":"plain: rows on the page, hairlines between them. card: the rows in one surface card (the task-rows list look)."},"caret":{"type":"enum","values":["start","end"],"default":"end","description":"Where the caret sits in each trigger, as the collapsible."},"disabled":{"type":"boolean","default":false,"description":"Every item is disabled (an item can be disabled on its own with its disabled field)."}},"playground":{"name":"Playground","props":{"variant":"plain","caret":"end","multiple":false,"collapsible":true,"disabled":false,"items":[{"value":"timeout","label":"Why did my build time out?","detail":"Builds stop after 45 minutes. Cache your dependencies, or move long jobs to data-pipeline."},{"value":"preview","label":"How do preview deploys work?","detail":"Every pull request gets its own URL. It updates on each push and is removed when the branch merges."},{"value":"rollback","label":"Can I roll back a deploy?","detail":"Yes. Open any earlier deploy of Production and choose Promote; the switch takes a few seconds."}]},"width":360},"exampleFiles":[{"file":"deploy-help","title":"Deploy help"},{"file":"project-settings","title":"Project settings"},{"file":"release-notes","title":"Release notes, several open"},{"file":"billing","title":"Billing, with actions inside"}],"worstCase":[{"name":"Long label and meta","width":280,"props":{"value":["a"],"items":[{"value":"a","label":"Reconcile the supplier invoices for the third quarter against the purchase orders and flag every mismatch","meta":"12,480 rows","detail":"averyveryveryveryveryveryveryveryverylongunbreakablesupplierreference@example-supplier-domain.com was not found in the ledger."},{"value":"b","label":"B"}]}},{"name":"Many items","width":320,"props":{"variant":"card","items":[{"value":"1","label":"One","detail":"1"},{"value":"2","label":"Two","detail":"2"},{"value":"3","label":"Three","detail":"3"},{"value":"4","label":"Four","detail":"4"},{"value":"5","label":"Five","detail":"5"},{"value":"6","label":"Six","detail":"6"},{"value":"7","label":"Seven","detail":"7"},{"value":"8","label":"Eight","detail":"8"},{"value":"9","label":"Nine","detail":"9"},{"value":"10","label":"Ten","detail":"10"},{"value":"11","label":"Eleven","detail":"11"},{"value":"12","label":"Twelve","detail":"12"}]}},{"name":"Right-to-left","width":320,"props":{"value":["a"],"items":[{"value":"a","label":"كم يستغرق الشحن؟","meta":"٢–٥ أيام","detail":"تغادر الطلبات المحمصة خلال يومي عمل."},{"value":"b","label":"هل يمكنني إرجاع كيس مفتوح؟","detail":"نعم، خلال ٣٠ يومًا."}]}},{"name":"No items","width":320,"props":{"items":[]}},{"name":"Narrow","width":120,"props":{"items":[{"value":"a","label":"How long does shipping take?","meta":"2–5 days","detail":"Three to five days."}]}}],"anatomy":[{"part":"root","element":"div","description":"Ark's accordion root; data-orientation=vertical. plain: no surface. card: one surface card (radius.card, shadow.card) that clips its rows."},{"part":"item","element":"div","description":"One disclosure (Ark's item, a collapsible root): data-state=open|closed, data-disabled. A 1px line under every item but the last."},{"part":"trigger","element":"button","description":"The collapsible's row trigger (the classes of collapsible.trigger, variant row): 44px minimum, padding 10, hover fill hover, press hover-2, focus ring inside. aria-expanded, aria-controls, data-state from the engine; native disabled."},{"part":"caret","element":"span","description":"The collapsible's caret: right caret (ph caret-right) that turns down 90deg while the item is open, mirrored right-to-left; first or last child of the trigger; aria-hidden; kbd-instant."},{"part":"label","element":"span","description":"The item's heading text: 14px/500 ink, wraps (never cut); its first line shares the caret's 24px line. Author text keeps its own direction."},{"part":"meta","element":"span","optional":true,"description":"Trailing quiet note in the trigger (12px ink-2), never wraps."},{"part":"content","element":"div","description":"role=region, aria-labelledby its trigger; the collapsible's region (grid rows 0fr to 1fr). Closed: hidden, out of the layout and the tab order."},{"part":"body","element":"div","description":"The one child of the region; it clips while the region moves. Holds the detail text, then the item's free content."},{"part":"text","element":"p","optional":true,"description":"The item's detail text: 12px ink-2, inset to line up with the label (padding 0 10px 10px)."}],"events":{"valueChange":"(value: string[]) the open items, after a click, Enter or Space"},"states":["hover","press","focus-visible","open","disabled"],"tokens":["color.surface","color.line","color.ink","color.ink-2","color.ink-3","color.hover","color.hover-2","shadow.card","radius.card","radius.control","text.xs","text.sm","duration.fast","duration.base","duration.move","duration.reveal","easing.out-strong"],"a11y":{"role":"button (aria-expanded, aria-controls) + region per item","keyboard":["Tab reaches the triggers one by one; nothing inside a closed item is reachable","Enter / Space toggle the focused item; the change is instant (no reveal, no caret turn)","ArrowDown / ArrowUp move focus to the next / previous trigger; Home / End to the first / last","A disabled item's trigger is skipped by Tab and by the arrows"],"notes":["Each trigger is a real button whose whole content is its name; each region is labelled by its trigger.","A closed region leaves the layout once its exit has played, which also takes it out of the accessibility tree.","Set it from outside by controlling value (React value / onValueChange)."]},"motion":["the collapsible's: reveal grid-template-rows 0fr -> 1fr over duration.reveal easing.out-strong with opacity over duration.base; the items below move with it","exit: the same transition back, held by fndn-collapsible-exit before the region is hidden; in single mode the item that closes and the one that opens move at the same time","caret: rotate 0 -> 90deg (right-to-left 180 -> 90deg) over duration.move easing.out-strong","trigger hover and press fills over duration.fast (hover gated to a fine pointer)","keyboard: region and caret are instant (kbd-instant)","first paint: nothing plays"]}