Component packs › Flaps › Hinged Accordion
Each panel swings down from its header on a 3D hinge, in shade until it faces you, and the sections below make room on the same spring.
Hinged Accordion is an accordion from Flaps, a component pack with 6 disclosure components: Accordions, trees and sidebars whose panels swing open on a real hinge. Price: $2 for the whole pack.
Built with: hinge spring, projected-height reflow, light and shade.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
sections | HingedSection[] | ||
open | number | Index open at start, or -1. | |
multiple | boolean | false | Allow several open at once. Default false. |
dark | boolean | follows the page | Force the dark (true) or light (false) look. Default: follows the page. |
onToggle | (index: number, open: boolean) => void | ||
autoplay | number | false | Showcase mode: opens the next section every N ms while visible. |
toggle(index: number, open?: boolean): voiddestroy(): voidimport HingedAccordion from './HingedAccordion';
<HingedAccordion />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Accordions.