ns-ui

Accordion Latch

An accordion whose sections latch shut with a small SVG hasp-and-staple on each closed header — opening swings the hasp off its staple, lifts the lid 2px, then unfolds the content; closing reverses and the hasp settles back down with a bounce.

Use when collapsible sections whose closed state should look mechanically shut, a hasp hooked over a staple that swings off before the lid lifts, for FAQ blocks and settings groups a user opens deliberately one at a time; it is the wrong choice for content that folds itself as it arrives (timeline-reasoning-rail streams agent steps and collapses completed ones on its own) and for expanding a single clamped block of prose in place (truncation-word-count).

Install

npx shadcn add https://design.helpmarq.com/r/accordion-latch.json
  • accordion
  • disclosure
  • hasp
  • latch
  • aria-expanded
  • roving-tabindex
  • svg

ns-ui / accordion-latch

Fourteen crates, sealed at the depot, checksum verified on arrival.

Coastal leg first, inland transfer at the junction, one overnight hold.

Signed at every handoff — depot, transfer, final delivery.

Opening rotates the hasp off its staple, lifts the lid, then unfolds the section — closing reverses and the hasp drops with a settle.

Props

PropTypeDefaultDescription
itemsHaspFoldItem[]
multiple?booleanAllow more than one section open at once. Default false (single-open).
defaultOpen?string[]Initially open item ids.
className?string