ns-ui
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.jsonns-ui / accordion-latch
Opening rotates the hasp off its staple, lifts the lid, then unfolds the section — closing reverses and the hasp drops with a settle.
| Prop | Type | Default | Description |
|---|---|---|---|
| items | HaspFoldItem[] | — | — |
| multiple? | boolean | — | Allow more than one section open at once. Default false (single-open). |
| defaultOpen? | string[] | — | Initially open item ids. |
| className? | string | — | — |