23 / 32
All 32 in 32 Tailwind CSS Tabs
- 01Tailwind CSS Tabs with Sliding Underline Indicator
- 02Neon Glow Tailwind Tabs with Per-Tab Accent Colors
- 03Neo-Brutalist Tailwind Tabs with Press Effect
- 04Color-Coded Tailwind CSS Tabs Component
- 05VS Code Style File Tabs in Tailwind CSS
- 06iOS Segmented Control in Tailwind CSS
- 07Bento Grid Card Tabs in Tailwind CSS
- 08Vertical Tabs with Timeline Progress in Tailwind CSS
- 09Terminal Window Tabs in Tailwind CSS (Retro CRT)
- 10Expanding Icon Tabs in Tailwind CSS
- 11Typewriter Animation Tabs in Tailwind CSS
- 12Tailwind Tabs with Particle Burst Animation
- 13Animated Counter Tabs in Tailwind CSS (Type Specimen)
- 14Oversized Cropped Text Tabs in Tailwind CSS
- 15Tailwind Sidebar Navigation with Sliding Indicator
- 16Tailwind Bottom Navigation Bar with Expanding Labels
- 17Variable Font Weight Tabs in Tailwind CSS
- 18Uppercase Tabs with Thick Sliding Bar in Tailwind CSS
- 19Drop Cap Initial Letter Tabs in Tailwind CSS
- 20Industrial Stencil Tabs in Tailwind CSS
- 21Bracket Selection Tabs in Tailwind CSS
- 22Bauhaus Color Block Tabs in Tailwind CSS
- 23Inverted Rubber Stamp Tabs in Tailwind CSS
- 24Outlined Tabs with Corner Markers in Tailwind CSS
- 25Tailwind Pill Tab Bar with Icons
- 26Risograph Print Effect Tabs in Tailwind CSS
- 27Animated SVG Underline Tabs in Tailwind CSS
- 28Font Specimen Glyph Tabs in Tailwind CSS
- 29Sliding Pill Tabs with Icons in Tailwind CSS
- 30Folded Corner Tabs in Tailwind CSS (clip-path)
- 31Bookmark Ribbon Navigation in Tailwind CSS
- 32Neumorphic Inset Tabs in Tailwind CSS
Inverted Rubber Stamp Tabs in Tailwind CSS
A crimson ink bar with cream legends; the chosen tab inverts to crimson-on-cream in a single frame while an inset shadow thumps in and lifts — a rubber stamp bedding into paper. The port runs the impact from has-checked:animate-ttb23-impact and adds a stamped "filed" mark that lands on the panel.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="ttb-23 group/tabs grid min-h-svh w-full place-items-center bg-ttb23-desk px-5 py-14 font-ttb23-mono text-ttb23-ink" aria-label="Inverted rubber stamp tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full overflow-hidden rounded-lg shadow-[0_18px_40px_-20px_rgb(0_0_0/0.45)]">
<div role="radiogroup" aria-label="Page" class="flex bg-ttb23-crimson">
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r1" checked>Recto</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r2">Verso</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r3">Folio</label>
</div>
<div class="relative min-h-32 bg-ttb23-cream px-6 py-5 font-ttb23-serif text-[17px] leading-relaxed italic">
<p class="hidden max-w-[30ch] group-has-[#ttb23-r1:checked]/tabs:block">The right-hand page, traditionally odd-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r2:checked]/tabs:block">The left-hand page, traditionally even-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r3:checked]/tabs:block">The full leaf — both sides counted as one.</p>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r1:checked]/tabs:block motion-reduce:animate-none">Filed · R</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r2:checked]/tabs:block motion-reduce:animate-none">Filed · V</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r3:checked]/tabs:block motion-reduce:animate-none">Filed · F</span>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb23-ink/12 bg-ttb23-cream/70 px-3.5 py-2 text-[11.5px] text-ttb23-ash">ease-[steps(1,end)] swap · has-checked:animate-impact · stamp mark</p>
</div>
</section><section class="ttb-23 group/tabs grid min-h-svh w-full place-items-center bg-ttb23-desk px-5 py-14 font-ttb23-mono text-ttb23-ink" aria-label="Inverted rubber stamp tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full overflow-hidden rounded-lg shadow-[0_18px_40px_-20px_rgb(0_0_0/0.45)]">
<div role="radiogroup" aria-label="Page" class="flex bg-ttb23-crimson">
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r1" checked>Recto</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r2">Verso</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r3">Folio</label>
</div>
<div class="relative min-h-32 bg-ttb23-cream px-6 py-5 font-ttb23-serif text-[17px] leading-relaxed italic">
<p class="hidden max-w-[30ch] group-has-[#ttb23-r1:checked]/tabs:block">The right-hand page, traditionally odd-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r2:checked]/tabs:block">The left-hand page, traditionally even-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r3:checked]/tabs:block">The full leaf — both sides counted as one.</p>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r1:checked]/tabs:block motion-reduce:animate-none">Filed · R</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r2:checked]/tabs:block motion-reduce:animate-none">Filed · V</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r3:checked]/tabs:block motion-reduce:animate-none">Filed · F</span>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb23-ink/12 bg-ttb23-cream/70 px-3.5 py-2 text-[11.5px] text-ttb23-ash">ease-[steps(1,end)] swap · has-checked:animate-impact · stamp mark</p>
</div>
</section>@import "tailwindcss";
@theme {
--color-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}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-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}<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=Space+Mono:wght@400;700&family=Newsreader:ital,opsz,wght@1,6..72,400..600&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=Space+Mono:wght@400;700&family=Newsreader:ital,opsz,wght@1,6..72,400..600&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
transition: background 0.05s steps(1,end)carried over asduration-50 ease-[steps(1,end)]; the impact keyframe moved into@themebehindhas-checked:animate-ttb23-impact.- The original's
:has()list referenced six radios for a three-tab demo; the port lists exactly the panels that exist. - UI upgrade from the CSS original: a "Filed" rubber-stamp mark lands on the panel (scale 1.6 → 1, −8°) each time a page is chosen, completing the stamp metaphor.
- UI upgrade: the bar is set in Space Mono with a 56px row height, framed on a desk-paper stage; a dashed inset focus ring in the current ink colour.
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: Inverted Rubber Stamp Tabs in Tailwind CSS
Source: https://codefronts.com/navigation/tailwind-css-tabs/inverted-rubber-stamp-tabs-tailwind-css/
A crimson ink bar with cream legends; the chosen tab inverts to crimson-on-cream in a single frame while an inset shadow thumps in and lifts — a rubber stamp bedding into paper. The port runs the impact from has-checked:animate-ttb23-impact and adds a stamped "filed" mark that lands on the panel.
## HTML
```html
<section class="ttb-23 group/tabs grid min-h-svh w-full place-items-center bg-ttb23-desk px-5 py-14 font-ttb23-mono text-ttb23-ink" aria-label="Inverted rubber stamp tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full overflow-hidden rounded-lg shadow-[0_18px_40px_-20px_rgb(0_0_0/0.45)]">
<div role="radiogroup" aria-label="Page" class="flex bg-ttb23-crimson">
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r1" checked>Recto</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r2">Verso</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r3">Folio</label>
</div>
<div class="relative min-h-32 bg-ttb23-cream px-6 py-5 font-ttb23-serif text-[17px] leading-relaxed italic">
<p class="hidden max-w-[30ch] group-has-[#ttb23-r1:checked]/tabs:block">The right-hand page, traditionally odd-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r2:checked]/tabs:block">The left-hand page, traditionally even-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r3:checked]/tabs:block">The full leaf — both sides counted as one.</p>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r1:checked]/tabs:block motion-reduce:animate-none">Filed · R</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r2:checked]/tabs:block motion-reduce:animate-none">Filed · V</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r3:checked]/tabs:block motion-reduce:animate-none">Filed · F</span>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb23-ink/12 bg-ttb23-cream/70 px-3.5 py-2 text-[11.5px] text-ttb23-ash">ease-[steps(1,end)] swap · has-checked:animate-impact · stamp mark</p>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}
```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: Inverted Rubber Stamp Tabs in Tailwind CSS
Source: https://codefronts.com/navigation/tailwind-css-tabs/inverted-rubber-stamp-tabs-tailwind-css/
A crimson ink bar with cream legends; the chosen tab inverts to crimson-on-cream in a single frame while an inset shadow thumps in and lifts — a rubber stamp bedding into paper. The port runs the impact from has-checked:animate-ttb23-impact and adds a stamped "filed" mark that lands on the panel.
## HTML
```html
<section class="ttb-23 group/tabs grid min-h-svh w-full place-items-center bg-ttb23-desk px-5 py-14 font-ttb23-mono text-ttb23-ink" aria-label="Inverted rubber stamp tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full overflow-hidden rounded-lg shadow-[0_18px_40px_-20px_rgb(0_0_0/0.45)]">
<div role="radiogroup" aria-label="Page" class="flex bg-ttb23-crimson">
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r1" checked>Recto</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center border-r border-ttb23-cream/25 text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] last:border-r-0 hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r2">Verso</label>
<label class="flex min-h-14 flex-1 cursor-pointer items-center justify-center text-[13px] font-bold tracking-[0.22em] text-ttb23-cream uppercase transition-[background-color,color] duration-50 ease-[steps(1,end)] hover:bg-ttb23-cream/10 has-checked:animate-ttb23-impact has-checked:bg-ttb23-cream has-checked:text-ttb23-crimson has-focus-visible:outline-2 has-focus-visible:-outline-offset-6 has-focus-visible:outline-dashed has-focus-visible:outline-current motion-reduce:has-checked:animate-none"><input class="sr-only" type="radio" name="ttb23" id="ttb23-r3">Folio</label>
</div>
<div class="relative min-h-32 bg-ttb23-cream px-6 py-5 font-ttb23-serif text-[17px] leading-relaxed italic">
<p class="hidden max-w-[30ch] group-has-[#ttb23-r1:checked]/tabs:block">The right-hand page, traditionally odd-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r2:checked]/tabs:block">The left-hand page, traditionally even-numbered.</p>
<p class="hidden max-w-[30ch] group-has-[#ttb23-r3:checked]/tabs:block">The full leaf — both sides counted as one.</p>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r1:checked]/tabs:block motion-reduce:animate-none">Filed · R</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r2:checked]/tabs:block motion-reduce:animate-none">Filed · V</span>
<span aria-hidden="true" class="absolute right-5 bottom-4 hidden -rotate-8 animate-ttb23-stamp rounded-sm border-2 border-ttb23-crimson/80 px-2 py-0.5 font-ttb23-mono text-[11px] font-bold tracking-[0.2em] text-ttb23-crimson/80 not-italic uppercase group-has-[#ttb23-r3:checked]/tabs:block motion-reduce:animate-none">Filed · F</span>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb23-ink/12 bg-ttb23-cream/70 px-3.5 py-2 text-[11.5px] text-ttb23-ash">ease-[steps(1,end)] swap · has-checked:animate-impact · stamp mark</p>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-ttb23-desk: #e4ddd0;
--color-ttb23-desk: oklch(0.900 0.019 83.1);
--color-ttb23-crimson: #c41a33;
--color-ttb23-crimson: oklch(0.528 0.199 21.4);
--color-ttb23-cream: #f5ead0;
--color-ttb23-cream: oklch(0.939 0.036 87.8);
--color-ttb23-ink: #2a2324;
--color-ttb23-ink: oklch(0.264 0.011 8.1);
--color-ttb23-ash: #4a4448;
--color-ttb23-ash: oklch(0.394 0.010 337.8);
--font-ttb23-mono: 'Space Mono', ui-monospace, monospace;
--font-ttb23-serif: 'Newsreader', Georgia, serif;
--animate-ttb23-impact: ttb23-impact 0.35s cubic-bezier(0.65, 0, 0.35, 1);
--animate-ttb23-stamp: ttb23-stamp 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
@keyframes ttb23-impact {
0% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0.4);
}
20% {
box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45);
}
100% {
box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0);
}
}
@keyframes ttb23-stamp {
from {
scale: 1.6;
opacity: 0;
}
to {
scale: 1;
opacity: 1;
}
}
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.ttb-23 {
width: 100%;
min-height: 100svh;
}
```How this works
Snap, then thump. The colour swap uses a one-step easing so there's no in-between pink; the impact is a keyframe that pushes an inset shadow in and releases it:
@keyframes ttb23-impact {
20% { box-shadow: inset 0 4px 14px rgb(0 0 0 / 0.45); }
100% { box-shadow: inset 0 0 0 0 rgb(0 0 0 / 0); }
}An animation applied by a selector restarts each time the selector starts matching, so every newly checked tab thumps once. The panel's stamp mark uses the same trick: it re-lands whenever its panel is revealed.
Make it yours
- Wetter stamp: deepen the 20% shadow to
inset 0 6px 20px rgb(0 0 0/0.6). - Blue ledger: crimson →
#1e40af. - Remove the "filed" mark for a quieter panel.
Gotchas — read before shipping
- Cream on crimson is 5.3:1 — keep labels at 12px or larger.
- The instant colour swap is meaning, not motion; it stays under reduced motion while the thump is removed.
- The stamp mark is decorative (
aria-hidden).
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
Universal CSS; the floor is Tailwind v4's sheet.