18 / 36
All 36 in 36 Tailwind Stacked Cards
- 01Tailwind Scroll-Driven Scaling Card Stack
- 02Tailwind Swipe Card Deck Drag to Dismiss
- 03Tailwind Glassmorphism Testimonial Card Stack
- 04Tailwind Stacked Cards Expand Accordion on Click
- 05Tailwind Fan Out Photo Stack on Hover
- 06Tailwind 3D Perspective Tilt Card Stack
- 07Tailwind Multi Step Form Card Stack
- 08Tailwind Tabbed Card Stack Bring to Front
- 09Tailwind Click to Front Stacked Cards Cycle
- 10Tailwind Classic Card Deck Stack Shadow
- 11Tailwind Fan Spread Hand of Cards
- 12Tailwind Polaroid Photo Stack Scattered Rotate
- 13Tailwind Staircase Offset Stacked Cards Cascade
- 14Tailwind Cards Spread Out Horizontally on Hover
- 15Tailwind Stacked Cards Lift on Hover Sibling Push
- 16Tailwind Accordion Stacked Cards Slide Out Menu
- 17Tailwind Shuffle Cards Animation Loop Deck
- 18Tailwind File Folder Tab Stacked Cards
- 19Tailwind Scattered Photos Pinch to Centre on Hover
- 20Tailwind Mobile Swipe Card Stack Translate3d
- 21Tailwind Single Accordion Card Nested Layers
- 22Tailwind Isometric Tower Stacked Cards 3D Column
- 23Tailwind 3D Flip Card Stack Reveal Back
- 24Tailwind Card Stack Tilt on Hover Quadrant
- 25Tailwind Notification Stack Pile Dismiss
- 26Tailwind Receipt Roll Unroll Stacked Items
- 27Tailwind Scratch Card Reveal Canvas Mask
- 28Tailwind Stacked Cards Hover Reveal Spread
- 29Tailwind Scroll Activated Sticky Stacking Cards
- 30Tailwind Stacked Testimonial Slider Radio
- 31Tailwind Isometric Overlapping Stacked Cards
- 32Tailwind Bento Grid Stacked Cards Hover Fan
- 33Tailwind Perspective Card Deck Depth Tunnel
- 34Tailwind Peel Back Corner Card Reveal
- 35Tailwind Timeline Stacked Milestone Cards
- 36Tailwind Spiral Tower Rotating Stacked Cards
Tailwind File Folder Tab Stacked Cards
Manila dividers, done in utilities. The tab silhouette is [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] — a shape with no utility and no need for one — and the same nesting trick as demo 08 retires six :nth-of-type pairings in favour of plain peer-checked:. Resting folders sit dimmed behind; the checked one comes forward at full strength.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="stk-18 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk18-sans bg-stk18-bg" aria-label="File folder tab stack">
<div class="relative w-[min(420px,100%)] h-65 pt-9.5">
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-1" checked>
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f1 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-1" style="--l:0">2024</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f1 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2024</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $2.1M · 14 clients · 3 new hires. The year we found product‑market fit.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-2">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f2 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-2" style="--l:1">2025</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f2 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2025</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $5.4M · 38 clients · shipped the platform rewrite on time.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-3">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f3 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-3" style="--l:2">2026</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f3 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2026</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $9.0M projected · expanding to the EU · Series A closed in Q1.</p>
</article>
</div>
</div>
</section><section class="stk-18 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk18-sans bg-stk18-bg" aria-label="File folder tab stack">
<div class="relative w-[min(420px,100%)] h-65 pt-9.5">
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-1" checked>
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f1 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-1" style="--l:0">2024</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f1 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2024</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $2.1M · 14 clients · 3 new hires. The year we found product‑market fit.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-2">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f2 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-2" style="--l:1">2025</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f2 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2025</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $5.4M · 38 clients · shipped the platform rewrite on time.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-3">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f3 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-3" style="--l:2">2026</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f3 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2026</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $9.0M projected · expanding to the EU · Series A closed in Q1.</p>
</article>
</div>
</div>
</section>@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}Setup — do this once per project
Skip this if your project already runs Tailwind v4.
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>Compiles in the browser — perfect for a CodePen or a quick test, not for production.
npm install tailwindcss @tailwindcss/vite
npm install tailwindcss @tailwindcss/vite// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})Any v4 setup works — Vite, PostCSS or the CLI. Nothing in this demo is bundler-specific.
@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@75..125,400;75..125,800;75..125,900&display=swap">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@75..125,400;75..125,800;75..125,900&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
- The webfonts load as
<link>tags insetup, not as an@importinside the stylesheet. Tailwind emits user@importrules after its own@layerblocks, and a late@importis invalid CSS — the browser drops it and the demo silently falls back to system fonts. - The divider silhouette is one arbitrary
[clip-path:polygon(...)]with underscore-escaped spaces — shorter and more accurate than faking a slant with borders. - Six
:nth-of-typepairings disappear by nesting each radio with its own tab and folder, exactly as in demo 08. When a port needs positional pairing, restructure the markup. contentskeeps the new wrapper out of the layout so the absolutely-positioned tabs and folders still resolve against the cabinet.- Colour is declared once per folder and shared by its tab, so the two cannot drift apart in a rebrand.
- Manila fills need dark ink: the text is
text-stk18-inkthroughout, and only whole background folders are dimmed — never the copy you are reading. - The
@themeblock is five entries and the stylesheet has no selectors: three folders, three tabs, zero JavaScript.
Here's a working CSS demo 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: Tailwind File Folder Tab Stacked Cards
Source: https://codefronts.com/components/tailwind-stacked-cards/tailwind-file-folder-tab-stacked-cards/
Manila dividers, done in utilities. The tab silhouette is [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] — a shape with no utility and no need for one — and the same nesting trick as demo 08 retires six :nth-of-type pairings in favour of plain peer-checked:. Resting folders sit dimmed behind; the checked one comes forward at full strength.
## HTML
```html
<section class="stk-18 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk18-sans bg-stk18-bg" aria-label="File folder tab stack">
<div class="relative w-[min(420px,100%)] h-65 pt-9.5">
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-1" checked>
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f1 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-1" style="--l:0">2024</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f1 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2024</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $2.1M · 14 clients · 3 new hires. The year we found product‑market fit.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-2">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f2 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-2" style="--l:1">2025</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f2 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2025</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $5.4M · 38 clients · shipped the platform rewrite on time.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-3">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f3 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-3" style="--l:2">2026</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f3 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2026</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $9.0M projected · expanding to the EU · Series A closed in Q1.</p>
</article>
</div>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}
```Here's a working CSS demo 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: Tailwind File Folder Tab Stacked Cards
Source: https://codefronts.com/components/tailwind-stacked-cards/tailwind-file-folder-tab-stacked-cards/
Manila dividers, done in utilities. The tab silhouette is [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] — a shape with no utility and no need for one — and the same nesting trick as demo 08 retires six :nth-of-type pairings in favour of plain peer-checked:. Resting folders sit dimmed behind; the checked one comes forward at full strength.
## HTML
```html
<section class="stk-18 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk18-sans bg-stk18-bg" aria-label="File folder tab stack">
<div class="relative w-[min(420px,100%)] h-65 pt-9.5">
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-1" checked>
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f1 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-1" style="--l:0">2024</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f1 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2024</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $2.1M · 14 clients · 3 new hires. The year we found product‑market fit.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-2">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f2 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-2" style="--l:1">2025</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f2 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2025</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $5.4M · 38 clients · shipped the platform rewrite on time.</p>
</article>
</div>
<div class="contents">
<input class="peer sr-only" type="radio" name="stk-18" id="stk-18-3">
<label class="absolute top-0 left-[calc(var(--l)*33.3%)] z-5 flex h-10.5 w-[32%] items-center justify-center pb-1.5 bg-stk18-f3 text-sm font-extrabold text-stk18-ink cursor-pointer brightness-82 transition-[filter,transform] duration-250 [clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)] hover:brightness-94 peer-checked:brightness-100 peer-checked:-translate-y-1 peer-focus-visible:outline-3 peer-focus-visible:outline-white peer-focus-visible:outline-offset-2 motion-reduce:transition-none" for="stk-18-3" style="--l:2">2026</label>
<article class="absolute inset-x-0 top-9 z-1 h-55 rounded-[2px_8px_8px_8px] bg-stk18-f3 p-6.5 text-stk18-ink opacity-50 shadow-[0_20px_40px_-24px_rgba(0,0,0,0.7)] transition-opacity duration-300 peer-checked:z-4 peer-checked:opacity-100 motion-reduce:transition-none">
<h3 class="m-0 mb-2.5 text-2xl font-black tracking-[-0.02em]">FY2026</h3>
<p class="m-0 max-w-[36ch] text-[15px] leading-relaxed">Revenue $9.0M projected · expanding to the EU · Series A closed in Q1.</p>
</article>
</div>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-stk18-bg: #2a2620;
--color-stk18-bg: oklch(0.27 0.014 70);
--color-stk18-ink: #2a2415;
--color-stk18-ink: oklch(0.26 0.028 85);
--color-stk18-f1: #e0b96a;
--color-stk18-f1: oklch(0.80 0.11 75);
--color-stk18-f2: #7ecaa3;
--color-stk18-f2: oklch(0.80 0.11 155);
--color-stk18-f3: #86c2e8;
--color-stk18-f3: oklch(0.80 0.10 235);
--font-stk18-sans: 'Archivo', system-ui, sans-serif;
}
```How this works
The shape is a clip-path, and that is the whole tab. A manila divider is a trapezoid, and Tailwind ships no polygon scale (nor should it):
[clip-path:polygon(8%_0,92%_0,100%_100%,0_100%)]Underscores stand in for the spaces inside the value; a literal space would end the class. The alternative — borders and pseudo-elements faking a slant — is more markup and less accurate.
Nesting beats positional selectors, again. As in demo 08, grouping each radio with its own tab and body reduces six :nth-of-type(n):checked ~ :nth-of-type(n) selectors to two variants. It is worth stating the general rule: when a CSS port needs positional pairing, restructure the markup rather than reaching for arbitrary selectors.
Contrast on a light fill. These folders are warm manila, so the body text is dark (text-stk18-ink) rather than white, and the resting opacity-50 applies to whole folders that are behind the open one — not to the text of the folder you are reading.
Make it yours
- Reshape the tabs by editing the
polygon()percentages — square dividers arepolygon(0_0,100%_0,100%_100%,0_100%). - Add a folder by copying one block, giving it the next
--land changing the33.3%step. - Recolour a folder and its tab together; both read the same token.
- Change the resting dim with
opacity-50. - Set the open folder with the
checkedattribute.
Gotchas — read before shipping
clip-pathvalues need the underscore escape for every space, and the whole value must be typed closed-up otherwise.- Nest each radio with its tab and body. Flat lists force positional selectors that utilities cannot express.
- Keep every tab clickable: the open folder may cover the others' bodies but never their tabs.
sr-onlyradios stay focusable and give you native arrow-key switching for free;hiddendestroys it.- A clipped element cannot show a
box-shadowon the clipped edges — put the shadow on the folder body, not the tab. - The tab text sits on a light fill, so it needs dark ink; white-on-manila fails contrast badly.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
clip-path: polygon() is Chrome 55+, Safari 9.1+, Firefox 54+; radio :checked sibling styling is universal. The floor is Tailwind v4's own generated sheet.