Skip to content
Hazine

Accordions and disclosures

1 of 6 shipped. Each take is a different structure, and the note under its title says how.

  • accordions and disclosures

    Independent panels under a group toolbar: bulk buttons go inert when they would do nothing, the open set is controllable for deep links, and a panel can render its fields as a description list.

    shadcn add @hazine/accordion-multi-open-controls

    Depends on button, @hazine/heading, @hazine/use-controllable-state, lucide-react, class-variance-authority

Planned 5

  • Native details accordion

    Platform-native disclosure instead of a scripted widget: exclusive groups use the details name attribute, the marker is a lucide chevron rotated through the open state, and height animation is applied only where interpolate-size is supported and motion is allowed.

  • Accordion with header meta

    Rich headers without nested interactive content: meta sits inside the trigger as text, while the secondary action is a sibling button outside it, so both are valid, separate tab stops.

  • Nested accordion

    Hierarchy: inner accordions keep their own state and arrow-key scope, heading levels increase by one per level, and collapsing a parent preserves the children's open state.

  • Show more text

    Truncation as disclosure for a single block of prose: overflow is measured with a ResizeObserver, the full text stays available to assistive tech, and no content is removed from the DOM.

  • Details row in a list

    Disclosure embedded in a row: only the chevron toggles, so the row title can still navigate; panels are independent and the trigger name includes the row title ('Show details for Invoice 2041').