14 / 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
Oversized Cropped Text Tabs in Tailwind CSS
The active tab's word swells from a compact 15px label to 46px display type and is cropped by its own cell — the word overruns the box and the box cuts it. Instrument Serif gives the crop a sharp editorial edge; a thin ruled frame keeps the strip reading like a specimen sheet.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="ttb-14 group/tabs grid min-h-svh w-full place-items-center bg-ttb14-bg px-5 py-14 font-ttb14-serif text-ttb14-paper" aria-label="Oversized cropped text tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full">
<div role="radiogroup" aria-label="Mode" class="flex border-y border-ttb14-paper/20">
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r1" checked><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Design</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r2"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Code</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r3"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper italic motion-reduce:transition-none">Preview</span></label>
</div>
<div class="px-1 pt-4 font-ttb14-mono text-[12.5px] leading-relaxed text-ttb14-mut">
<p class="hidden group-has-[#ttb14-r1:checked]/tabs:block">01 — Tokens, components, motion.</p>
<p class="hidden group-has-[#ttb14-r2:checked]/tabs:block">02 — Modern CSS, zero dependencies.</p>
<p class="hidden group-has-[#ttb14-r3:checked]/tabs:block">03 — Live, with every state.</p>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb14-paper/15 px-3.5 py-2 font-ttb14-mono text-[11.5px] text-ttb14-mut">overflow-hidden cell · text-[15px] → text-[46px]</p>
</div>
</section><section class="ttb-14 group/tabs grid min-h-svh w-full place-items-center bg-ttb14-bg px-5 py-14 font-ttb14-serif text-ttb14-paper" aria-label="Oversized cropped text tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full">
<div role="radiogroup" aria-label="Mode" class="flex border-y border-ttb14-paper/20">
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r1" checked><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Design</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r2"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Code</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r3"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper italic motion-reduce:transition-none">Preview</span></label>
</div>
<div class="px-1 pt-4 font-ttb14-mono text-[12.5px] leading-relaxed text-ttb14-mut">
<p class="hidden group-has-[#ttb14-r1:checked]/tabs:block">01 — Tokens, components, motion.</p>
<p class="hidden group-has-[#ttb14-r2:checked]/tabs:block">02 — Modern CSS, zero dependencies.</p>
<p class="hidden group-has-[#ttb14-r3:checked]/tabs:block">03 — Live, with every state.</p>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb14-paper/15 px-3.5 py-2 font-ttb14-mono text-[11.5px] text-ttb14-mut">overflow-hidden cell · text-[15px] → text-[46px]</p>
</div>
</section>@import "tailwindcss";
@theme {
--color-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
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-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
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=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&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=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
input:checked + .tt02b .tt02hd { font-size:28px }becamegroup-has-checked/tab:text-[46px]; the centring transform became-translate-1/2.- The
:has()panel block becamegroup-has-[#ttb14-rN:checked]/tabs:blockon each panel. - UI upgrade from the CSS original: the active size went from 28px to 46px so the crop actually happens (at 28px most words fit their cell), set in Instrument Serif for a crisp cut edge.
- UI upgrade: a visible inset keyboard focus ring (the original had none on the labels), and resting labels raised from 50% cream to a 6.8:1 token.
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: Oversized Cropped Text Tabs in Tailwind CSS
Source: https://codefronts.com/navigation/tailwind-css-tabs/oversized-cropped-text-tabs-tailwind-css/
The active tab's word swells from a compact 15px label to 46px display type and is cropped by its own cell — the word overruns the box and the box cuts it. Instrument Serif gives the crop a sharp editorial edge; a thin ruled frame keeps the strip reading like a specimen sheet.
## HTML
```html
<section class="ttb-14 group/tabs grid min-h-svh w-full place-items-center bg-ttb14-bg px-5 py-14 font-ttb14-serif text-ttb14-paper" aria-label="Oversized cropped text tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full">
<div role="radiogroup" aria-label="Mode" class="flex border-y border-ttb14-paper/20">
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r1" checked><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Design</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r2"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Code</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r3"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper italic motion-reduce:transition-none">Preview</span></label>
</div>
<div class="px-1 pt-4 font-ttb14-mono text-[12.5px] leading-relaxed text-ttb14-mut">
<p class="hidden group-has-[#ttb14-r1:checked]/tabs:block">01 — Tokens, components, motion.</p>
<p class="hidden group-has-[#ttb14-r2:checked]/tabs:block">02 — Modern CSS, zero dependencies.</p>
<p class="hidden group-has-[#ttb14-r3:checked]/tabs:block">03 — Live, with every state.</p>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb14-paper/15 px-3.5 py-2 font-ttb14-mono text-[11.5px] text-ttb14-mut">overflow-hidden cell · text-[15px] → text-[46px]</p>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
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: Oversized Cropped Text Tabs in Tailwind CSS
Source: https://codefronts.com/navigation/tailwind-css-tabs/oversized-cropped-text-tabs-tailwind-css/
The active tab's word swells from a compact 15px label to 46px display type and is cropped by its own cell — the word overruns the box and the box cuts it. Instrument Serif gives the crop a sharp editorial edge; a thin ruled frame keeps the strip reading like a specimen sheet.
## HTML
```html
<section class="ttb-14 group/tabs grid min-h-svh w-full place-items-center bg-ttb14-bg px-5 py-14 font-ttb14-serif text-ttb14-paper" aria-label="Oversized cropped text tabs demo">
<div class="grid w-full max-w-xl justify-items-center gap-7">
<div class="w-full">
<div role="radiogroup" aria-label="Mode" class="flex border-y border-ttb14-paper/20">
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r1" checked><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Design</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden border-r border-ttb14-paper/15 has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r2"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper motion-reduce:transition-none">Code</span></label>
<label class="group/tab relative h-18 flex-1 cursor-pointer overflow-hidden has-focus-visible:outline-1 has-focus-visible:-outline-offset-4 has-focus-visible:outline-dashed has-focus-visible:outline-ttb14-paper"><input class="sr-only" type="radio" name="ttb14" id="ttb14-r3"><span class="absolute top-1/2 left-1/2 -translate-1/2 text-[15px] whitespace-nowrap text-ttb14-mut transition-[font-size,color] duration-500 ease-[cubic-bezier(0.65,0,0.35,1)] group-hover/tab:text-ttb14-paper group-has-checked/tab:text-[46px] group-has-checked/tab:text-ttb14-paper italic motion-reduce:transition-none">Preview</span></label>
</div>
<div class="px-1 pt-4 font-ttb14-mono text-[12.5px] leading-relaxed text-ttb14-mut">
<p class="hidden group-has-[#ttb14-r1:checked]/tabs:block">01 — Tokens, components, motion.</p>
<p class="hidden group-has-[#ttb14-r2:checked]/tabs:block">02 — Modern CSS, zero dependencies.</p>
<p class="hidden group-has-[#ttb14-r3:checked]/tabs:block">03 — Live, with every state.</p>
</div>
</div>
<p aria-hidden="true" class="rounded-full border border-ttb14-paper/15 px-3.5 py-2 font-ttb14-mono text-[11.5px] text-ttb14-mut">overflow-hidden cell · text-[15px] → text-[46px]</p>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-ttb14-bg: #161616;
--color-ttb14-bg: oklch(0.200 0 0);
--color-ttb14-paper: #ece6d4;
--color-ttb14-paper: oklch(0.925 0.025 91.6);
--color-ttb14-mut: #a8a293;
--color-ttb14-mut: oklch(0.713 0.022 88.8);
--font-ttb14-serif: 'Instrument Serif', Georgia, serif;
--font-ttb14-mono: 'JetBrains Mono', ui-monospace, monospace;
}
/* 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-14 {
width: 100%;
min-height: 100svh;
}
```How this works
The crop is the parent's job. Each cell clips; the word is centred absolutely and simply gets larger:
<label class="group/tab relative h-18 flex-1 overflow-hidden">
<span class="absolute top-1/2 left-1/2 -translate-1/2 whitespace-nowrap
text-[15px] transition-[font-size,color] duration-500
group-has-checked/tab:text-[46px]">Preview</span>Focus without clipping. An outline on a clipping box is drawn outside and survives, but the port uses an inset ring (-outline-offset-4) so it never touches the crop edge.
Make it yours
- Harder crop:
text-[60px]; softer:text-[34px]. - Light stock: paper
#f4efe3, ink#161412. - Two rows on phones: wrap the strip with
max-sm:flex-col.
Gotchas — read before shipping
- Animating
font-sizere-lays out text every frame; it's fine for three cells, avoid it on long lists. - Below ~360px the cropped word may be mostly cut — that's the effect, but test your longest label.
- The word's accessible name is unaffected by the crop.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
:has() for panels; everything else is universal.