32 CSS Accordions — Vertical & Horizontal
11 / 32

All 32 in 32 CSS Accordions — Vertical & Horizontal

  1. 01Pure CSS FAQ Accordion with <details> and <summary> (No JavaScript)
  2. 02Mobile Navigation Accordion Menu (CSS-Only Hamburger + Drill-Down)
  3. 03E-commerce Filter Sidebar Accordion with Exclusive Open (Product Filters)
  4. 04Nested Multi-Level Accordion (CSS Tree View for Docs & File Explorers)
  5. 05Smoothly Animated <details> Accordion — Transition height: auto in Pure CSS
  6. 06Exclusive Single-Open Accordion with the details name Attribute (Close Others Automatically)
  7. 07Underline Reveal Accordion — Editorial Minimal with Animated Rules
  8. 08Numbered Steps Accordion — Process Timeline for Onboarding Flows
  9. 09Plus / Minus Morph Accordion — CSS-Drawn Icon Animation
  10. 10Chevron Rotate Card Accordion — The Production Default, Perfected
  11. 11Brutalist Stamp Accordion — Bold Borders, Hard Shadows, Zero Subtlety
  12. 12Glassmorphism Frosted Accordion with backdrop-filter Blur
  13. 13Minimal Rail Accordion — Timeline Dot Spine for Changelogs & Roadmaps
  14. 14Card Lift Accordion — Elevation & Scale on Open (Material-Style Depth)
  15. 15Diagonal Slant Accordion — Skewed Parallelogram Headers
  16. 16Stepped Stair Accordion — Indented Cascade with Depth Levels
  17. 17Circular Dial Accordion — Conic-Gradient Progress Ring Toggles
  18. 18Marquee Header Accordion — Scrolling Ticker Titles on the Open Item
  19. 19Code Comment Accordion — Editor-Themed Collapsible Doc Blocks
  20. 20Paper Fold 3D Accordion — perspective + rotateX Unfolding Panels
  21. 21Equalizer Accordion — Animated Level Bars for Playlists & Audio
  22. 22Stacked Cards Deck Accordion — Overlapping Pull-Out Hand
  23. 23Holographic Slot Accordion — @property Rotating Border Sheen
  24. 24Aurora Drift Accordion — Dark Ambient Glow that Follows the Open Item
  25. 25Horizontal Strip Tabs Accordion — Vertical Text Columns with flex-grow
  26. 26Horizontal Image Reveal Accordion — Expanding Photo Gallery Panels
  27. 27Color Block Horizontal Accordion — Bold Flat Panels for Feature Sections
  28. 28Numbered Spine Horizontal Accordion — Editorial Magazine Index
  29. 29Curtain Slide Horizontal Accordion — clip-path Reveal Panels
  30. 30Vinyl Spine Horizontal Accordion — Record Shelf with Pull-Out Sleeves
  31. 31Cinema Reel Horizontal Accordion — Dark Letterboxed Showcase
  32. 32Aurora Strip Horizontal Accordion — Animated Gradient Glow Panels
Pure CSSMIT licensed

Brutalist Stamp Accordion — Bold Borders, Hard Shadows, Zero Subtlety

Neo-brutalism for disclosure: 3px black borders, an offset hard shadow that the open item physically 'presses' flat, uppercase mono labels, a stamped index chip and an unapologetic yellow page. The open interaction feels mechanical — click, CLUNK — perfect for portfolios, zines and dev-tool brands.

Live Demo
Plain CSSTailwind v4
Try it

Build interactive UI like this from scratch: 20 HTML, CSS & JavaScript projects

ZTM · JavaScript Web Projects · 30‑day money-back guarantee · Affiliate link

10% off at checkout with code
Check ZTM Course

The code

<section class="acc-11" aria-label="Brutalist stamp accordion demo">
  <div class="acc-11__wrap">
    <h3 class="acc-11__title">FAQ_</h3>
    <details class="acc-11__item" open>
      <summary class="acc-11__sum"><span class="acc-11__chip">01</span>WHAT IS THIS?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>A weekly zine about the unpolished web — view-source culture, personal sites, and software with opinions. Printed badly on purpose.</p></div>
    </details>
    <details class="acc-11__item">
      <summary class="acc-11__sum"><span class="acc-11__chip">02</span>HOW MUCH?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>Free online. $5 for the paper edition, which is photocopied, stapled crooked, and mailed with a sticker.</p></div>
    </details>
    <details class="acc-11__item">
      <summary class="acc-11__sum"><span class="acc-11__chip">03</span>CAN I SUBMIT?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>Yes. 500 words max, no pitches, no PDFs. Send plain text or a URL. If it needs a cookie banner, it's a no.</p></div>
    </details>
  </div>
</section>
.acc-11,
.acc-11 *,
.acc-11 *::before,
.acc-11 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.acc-11 {
  --ink: #111;
  --paper: #ffe14d;
  --shadow: 6px;
  font-family: ui-monospace,'Cascadia Code',Menlo,monospace;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 44px 24px;
}

.acc-11__wrap {
  width: min(560px,100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.acc-11__title {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.acc-11__item {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
  transition: translate .12s ease-out,box-shadow .12s ease-out;
}

.acc-11__item:hover {
  translate: 2px 2px;
  box-shadow: 4px 4px 0 var(--ink);
}

.acc-11__item[open] {
  translate: 4px 4px;
  box-shadow: 2px 2px 0 var(--ink);
}

.acc-11__sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  cursor: pointer;
}

.acc-11__sum::-webkit-details-marker {
  display: none;
}

.acc-11__sum::marker {
  content: "";
}

.acc-11__chip {
  display: grid;
  place-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  font-size: 13px;
  background: #fff;
  transition: background .12s,color .12s;
  flex: none;
}

.acc-11__item[open] .acc-11__chip {
  background: var(--ink);
  color: var(--paper);
}

.acc-11__arrow {
  margin-left: auto;
  font-size: 13px;
  transition: rotate .18s ease-out;
}

.acc-11__item[open] .acc-11__arrow {
  rotate: 180deg;
}

.acc-11__body {
  border-top: 3px solid var(--ink);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #2a2a2a;
  background: repeating-linear-gradient(0deg,#fff 0 27px,#f4f0e4 27px 28px);
}

.acc-11__sum:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .acc-11__item,
    .acc-11__arrow {
    transition: none;
  }
}
/* No JavaScript — details[open] translates the slab 4px while its hard shadow shrinks the same amount, so the card visually presses into the page like a mechanical key. */
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Accordions — Vertical & Horizontal from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Brutalist Stamp Accordion — Bold Borders, Hard Shadows, Zero Subtlety
Source: https://codefronts.com/navigation/css-accordions/brutalist-stamp/

Neo-brutalism for disclosure: 3px black borders, an offset hard shadow that the open item physically 'presses' flat, uppercase mono labels, a stamped index chip and an unapologetic yellow page. The open interaction feels mechanical — click, CLUNK — perfect for portfolios, zines and dev-tool brands.
## HTML
```html
<section class="acc-11" aria-label="Brutalist stamp accordion demo">
  <div class="acc-11__wrap">
    <h3 class="acc-11__title">FAQ_</h3>
    <details class="acc-11__item" open>
      <summary class="acc-11__sum"><span class="acc-11__chip">01</span>WHAT IS THIS?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>A weekly zine about the unpolished web — view-source culture, personal sites, and software with opinions. Printed badly on purpose.</p></div>
    </details>
    <details class="acc-11__item">
      <summary class="acc-11__sum"><span class="acc-11__chip">02</span>HOW MUCH?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>Free online. $5 for the paper edition, which is photocopied, stapled crooked, and mailed with a sticker.</p></div>
    </details>
    <details class="acc-11__item">
      <summary class="acc-11__sum"><span class="acc-11__chip">03</span>CAN I SUBMIT?<span class="acc-11__arrow">▼</span></summary>
      <div class="acc-11__body"><p>Yes. 500 words max, no pitches, no PDFs. Send plain text or a URL. If it needs a cookie banner, it's a no.</p></div>
    </details>
  </div>
</section>
```
## CSS
```css
.acc-11,
.acc-11 *,
.acc-11 *::before,
.acc-11 *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.acc-11 {
  --ink: #111;
  --paper: #ffe14d;
  --shadow: 6px;
  font-family: ui-monospace,'Cascadia Code',Menlo,monospace;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 44px 24px;
}

.acc-11__wrap {
  width: min(560px,100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.acc-11__title {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.acc-11__item {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 var(--ink);
  transition: translate .12s ease-out,box-shadow .12s ease-out;
}

.acc-11__item:hover {
  translate: 2px 2px;
  box-shadow: 4px 4px 0 var(--ink);
}

.acc-11__item[open] {
  translate: 4px 4px;
  box-shadow: 2px 2px 0 var(--ink);
}

.acc-11__sum {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  cursor: pointer;
}

.acc-11__sum::-webkit-details-marker {
  display: none;
}

.acc-11__sum::marker {
  content: "";
}

.acc-11__chip {
  display: grid;
  place-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  font-size: 13px;
  background: #fff;
  transition: background .12s,color .12s;
  flex: none;
}

.acc-11__item[open] .acc-11__chip {
  background: var(--ink);
  color: var(--paper);
}

.acc-11__arrow {
  margin-left: auto;
  font-size: 13px;
  transition: rotate .18s ease-out;
}

.acc-11__item[open] .acc-11__arrow {
  rotate: 180deg;
}

.acc-11__body {
  border-top: 3px solid var(--ink);
  padding: 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #2a2a2a;
  background: repeating-linear-gradient(0deg,#fff 0 27px,#f4f0e4 27px 28px);
}

.acc-11__sum:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .acc-11__item,
    .acc-11__arrow {
    transition: none;
  }
}
```

## JavaScript
```js
/* No JavaScript — details[open] translates the slab 4px while its hard shadow shrinks the same amount, so the card visually presses into the page like a mechanical key. */
```

How this works

Every item is a white slab with border:3px solid #111 and a hard offset shadow (box-shadow:6px 6px 0 #111 — no blur, that's the brutalist tell). On open, the item translates 4px down-right while the shadow shrinks to 2px: the card visually PRESSES into the page like a mechanical key, state you can feel. Hover nudges 2px as a preview of the same motion.

Typography does the rest: uppercase widetracked mono summaries, an index chip that inverts to black-on-yellow when open, and answers set in the same mono at reading size. No rounded corners anywhere, no gradients, no transparency — the discipline is the aesthetic.

Techniques used: hard offset box-shadow (0 blur) with press-flat interaction · translate + shadow-shrink 'mechanical press' state · inverted index chip on [open] · uppercase mono type system · strictly 0-radius geometry

Make it yours

  • Shadow depth and press distance = --shadow / the open translate.
  • Paper color: swap the yellow for any loud flat (#fff also works).
  • Border weight 3px → 2px for a lighter build.
  • Chips: numbers here; swap for ★ / → glyphs to taste.

Gotchas — read before shipping

  • The press motion MUST pair translate with shadow shrink by the same amount, or the card appears to detach from its shadow.
  • Zero blur on shadows — a blurred shadow instantly breaks the brutalist language.
  • Uppercase mono at small sizes hurts readability: keep answers sentence-case or ≥14px.
  • This style shouts; use it on brand-forward pages, not in dense product UI where it exhausts users.

Browser support

ChromeSafariFirefoxEdge
allallallall

Borders, box-shadow and transforms — baseline everywhere since forever.

Techniques used in this demo

Search CodeFronts

Loading…