Settings Accordion
Grouped preference sections that open onto rows of switches, each header chevron flipping as its group expands.
- lines of CSS
- 62lines of CSS
- dependencies
- 0dependencies
- browser, for years
- Everybrowser, for years
- motion only on interaction
- Hovermotion only on interaction
Notifications
Privacy
Advanced
Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.
.fx-v13-at-setacc-15464 {
width: 236px;
background: #111a2b;
border: 1px solid #253049;
border-radius: 0.6rem;
overflow: hidden;
color: #cbd5e1;
}
.fx-v13-at-setacc-15464 details { border-bottom: 1px solid #1e293b; }
.fx-v13-at-setacc-15464 details:last-child { border-bottom: none; }
.fx-v13-at-setacc-15464 summary {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.55rem 0.7rem;
cursor: pointer;
list-style: none;
transition: background 0.18s ease;
}
.fx-v13-at-setacc-15464 summary::-webkit-details-marker { display: none; }
.fx-v13-at-setacc-15464 summary:hover { background: #16203a; }
.fx-v13-at-setacc-15464 b { font-size: 0.78rem; color: #f1f5f9; }
.fx-v13-at-setacc-15464 summary i {
width: 8px;
height: 8px;
border-right: 2px solid #64748b;
border-bottom: 2px solid #64748b;
transform: rotate(45deg) translate(-2px, -2px);
transition: transform 0.25s ease;
}
.fx-v13-at-setacc-15464 details[open] summary i { transform: rotate(-135deg) translate(-2px, -2px); }
.fx-v13-at-setacc-15464 .row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.35rem 0.7rem 0.35rem 0.9rem;
font-size: 0.72rem;
color: #94a3b8;
}
.fx-v13-at-setacc-15464 .row:last-child { padding-bottom: 0.6rem; }
.fx-v13-at-setacc-15464 u {
position: relative;
width: 30px;
height: 17px;
border-radius: 999px;
background: #334155;
cursor: pointer;
transition: background 0.24s ease;
}
.fx-v13-at-setacc-15464 u::after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #e2e8f0;
transition: transform 0.24s ease;
}
.fx-v13-at-setacc-15464 .on { background: #6366f1; }
.fx-v13-at-setacc-15464 .on::after { transform: translateX(13px); background: #fff; }<div class="fx-v13-at-setacc-15464">
<details open>
<summary>
<b>Notifications</b>
<i></i>
</summary>
<div class="row">
<span>Email digest</span>
<u class="on"></u>
</div>
<div class="row">
<span>Mentions</span>
<u class="on"></u>
</div>
</details>
<details>
<summary>
<b>Privacy</b>
<i></i>
</summary>
<div class="row">
<span>Public profile</span>
<u></u>
</div>
</details>
<details>
<summary>
<b>Advanced</b>
<i></i>
</summary>
<div class="row">
<span>Beta features</span>
<u></u>
</div>
</details>
</div>What do I do with this?
- Put
settings-accordion-15465.cssanywhere your page already loads CSS from — in Next.js that isapp/globals.css, or any stylesheet with a<link>in your HTML. - Then put the class on the element you want it on:
<button class="fx-v13-at-setacc-15464">. The CSS does nothing until a class name in it matches something on the page.
- Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add settings-accordion-15465What's included
- The markup and the stylesheet, in whichever framework you pick
- No runtime dependencies
Works with
- React
- Vue
- Svelte
- Tailwind
- styled-components
- Plain CSS
npx hoverlab add settings-accordion-15465
Or over MCP, from your editor's agent — no account needed.
License
Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.
Motion safety
Static estimate, read from the CSS
- Reduced motion
- Brief motion, no guard
Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.
- What it animates
- Repaints
Animates
background. No reflow, but the browser repaints every frame, which is fine for one element and costly across many. - Flashing (WCAG 2.3.1)
- No flashing found
No repeating change in opacity, colour or brightness large enough to count as a flash.
- Layout shift (CLS)
- No shift expected
Nothing it animates moves or resizes the box in flow. A category from the CSS, not a measurement for this effect.
Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed
30 more effects in Accordions & Tabs
All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.
Browse Accordions & TabsShipping one commercially
Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.
- A commercial licence for everything in the catalog
- Unlimited bundle exports, in Vue, Svelte and Tailwind
- One payment — no subscription, nothing to renew
7 variations of Settings Accordion
Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.