32 Tailwind CSS Tabs
32 / 32
Pure TailwindMIT licensed

Neumorphic Inset Tabs in Tailwind CSS

Brass legends on a slate tray; the chosen label sits in a chiselled well — a dark inset shadow on its top-left, a faint highlight on the far lip, letters with a hard engraving shadow. The port adds a small brass indicator lamp per well so the state doesn't depend on reading depth alone.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<section class="ttb-32 group/tabs grid min-h-svh w-full place-items-center bg-ttb32-bg px-5 py-14 font-ttb32-mono text-ttb32-brass" aria-label="Neumorphic inset tabs demo">
  <div class="grid w-full max-w-xl justify-items-center gap-7">
    <div class="w-full">
      <div role="radiogroup" aria-label="Process" class="flex gap-2 rounded-lg bg-ttb32-tray p-2 shadow-[inset_0_1px_0_rgb(255_255_255/0.06),0_10px_24px_-10px_rgb(0_0_0/0.6)]">
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r1" checked><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Etch</label>
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r2"><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Engrave</label>
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r3"><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Emboss</label>
      </div>
      <div class="pt-5 font-ttb32-serif text-[16px] text-ttb32-brass italic">
        <p class="hidden group-has-[#ttb32-r1:checked]/tabs:block">Acid bites the plate to print recessed lines.</p>
        <p class="hidden group-has-[#ttb32-r2:checked]/tabs:block">A burin cuts directly into the metal surface.</p>
        <p class="hidden group-has-[#ttb32-r3:checked]/tabs:block">Pressure raises the paper into a relief.</p>
      </div>
    </div>
    <p aria-hidden="true" class="rounded-full border border-ttb32-brass/20 px-3.5 py-2 text-[11.5px] text-ttb32-brass-dim">inset well · [text-shadow] engraving · brass lamp</p>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-ttb32-bg: #3a3a42;
  --color-ttb32-bg: oklch(0.352 0.014 285.7);
  --color-ttb32-tray: #2a2a30;
  --color-ttb32-tray: oklch(0.287 0.011 285.7);
  --color-ttb32-well: #1f1f24;
  --color-ttb32-well: oklch(0.241 0.009 285.7);
  --color-ttb32-brass: #d4ab66;
  --color-ttb32-brass: oklch(0.764 0.100 79.4);
  --color-ttb32-brass-dim: #b3965f;
  --color-ttb32-brass-dim: oklch(0.687 0.081 82.7);
  --font-ttb32-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-ttb32-serif: 'Newsreader', Georgia, serif;
}
/* 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-32 {
  width: 100%;
  min-height: 100svh;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<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.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-ttb32-bg: #3a3a42;
  --color-ttb32-bg: oklch(0.352 0.014 285.7);
  --color-ttb32-tray: #2a2a30;
  --color-ttb32-tray: oklch(0.287 0.011 285.7);
  --color-ttb32-well: #1f1f24;
  --color-ttb32-well: oklch(0.241 0.009 285.7);
  --color-ttb32-brass: #d4ab66;
  --color-ttb32-brass: oklch(0.764 0.100 79.4);
  --color-ttb32-brass-dim: #b3965f;
  --color-ttb32-brass-dim: oklch(0.687 0.081 82.7);
  --font-ttb32-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-ttb32-serif: 'Newsreader', Georgia, serif;
}
/* 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-32 {
  width: 100%;
  min-height: 100svh;
}
3Fonts used by this demooptional — skip if you have your own type stack
<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=JetBrains+Mono:wght@400;500;700;800&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.

  • input:checked + .tt20b (background, colour, two inset shadows, text-shadow) became five has-checked: utilities, the shadows as arbitrary values.
  • rgba(201,161,94,0.6) became a solid brass-dim token rather than an alpha, so contrast doesn't depend on what's behind.
  • UI upgrade from the CSS original: a brass indicator lamp lights in the active well — neumorphic "pressed" states are often read as disabled, and the lamp removes the ambiguity.
  • UI upgrade: the tray gained an outer highlight and drop shadow so the wells read as cut into a raised plate; inactive labels raised to 5.2:1 on the tray, and a focus ring was added.
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 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: Neumorphic Inset Tabs in Tailwind CSS
Source: https://codefronts.com/navigation/tailwind-css-tabs/neumorphic-inset-tabs-tailwind-css/

Brass legends on a slate tray; the chosen label sits in a chiselled well — a dark inset shadow on its top-left, a faint highlight on the far lip, letters with a hard engraving shadow. The port adds a small brass indicator lamp per well so the state doesn't depend on reading depth alone.
## HTML
```html
<section class="ttb-32 group/tabs grid min-h-svh w-full place-items-center bg-ttb32-bg px-5 py-14 font-ttb32-mono text-ttb32-brass" aria-label="Neumorphic inset tabs demo">
  <div class="grid w-full max-w-xl justify-items-center gap-7">
    <div class="w-full">
      <div role="radiogroup" aria-label="Process" class="flex gap-2 rounded-lg bg-ttb32-tray p-2 shadow-[inset_0_1px_0_rgb(255_255_255/0.06),0_10px_24px_-10px_rgb(0_0_0/0.6)]">
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r1" checked><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Etch</label>
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r2"><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Engrave</label>
        <label class="group/tab flex min-h-14 flex-1 cursor-pointer items-center justify-center gap-2.5 rounded-md text-[12px] font-extrabold tracking-[0.22em] text-ttb32-brass-dim uppercase transition-[color,background-color,box-shadow] duration-300 hover:text-ttb32-brass has-checked:bg-ttb32-well has-checked:text-ttb32-brass has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)] has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ttb32-brass motion-reduce:transition-none"><input class="sr-only" type="radio" name="ttb32" id="ttb32-r3"><span aria-hidden="true" class="size-1.5 rounded-full bg-black/40 transition-[background-color,box-shadow] group-has-checked/tab:bg-ttb32-brass group-has-checked/tab:shadow-[0_0_6px_var(--color-ttb32-brass)]"></span>Emboss</label>
      </div>
      <div class="pt-5 font-ttb32-serif text-[16px] text-ttb32-brass italic">
        <p class="hidden group-has-[#ttb32-r1:checked]/tabs:block">Acid bites the plate to print recessed lines.</p>
        <p class="hidden group-has-[#ttb32-r2:checked]/tabs:block">A burin cuts directly into the metal surface.</p>
        <p class="hidden group-has-[#ttb32-r3:checked]/tabs:block">Pressure raises the paper into a relief.</p>
      </div>
    </div>
    <p aria-hidden="true" class="rounded-full border border-ttb32-brass/20 px-3.5 py-2 text-[11.5px] text-ttb32-brass-dim">inset well · [text-shadow] engraving · brass lamp</p>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-ttb32-bg: #3a3a42;
  --color-ttb32-bg: oklch(0.352 0.014 285.7);
  --color-ttb32-tray: #2a2a30;
  --color-ttb32-tray: oklch(0.287 0.011 285.7);
  --color-ttb32-well: #1f1f24;
  --color-ttb32-well: oklch(0.241 0.009 285.7);
  --color-ttb32-brass: #d4ab66;
  --color-ttb32-brass: oklch(0.764 0.100 79.4);
  --color-ttb32-brass-dim: #b3965f;
  --color-ttb32-brass-dim: oklch(0.687 0.081 82.7);
  --font-ttb32-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-ttb32-serif: 'Newsreader', Georgia, serif;
}
/* 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-32 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Depth is a tonal ladder. Stage, tray and well step down in lightness; the inset shadows only read because of that ladder:

has-checked:bg-ttb32-well
has-checked:shadow-[inset_2px_2px_4px_rgb(0_0_0/0.55),inset_-1px_-1px_2px_rgb(255_255_255/0.08)]
has-checked:[text-shadow:1px_1px_0_rgb(0_0_0/0.55)]

Neumorphism's known weakness is that "pressed" can read as "disabled". A lamp that lights brass in the active well is an unambiguous second signal.

Make it yours

  • Silver on graphite: brass → #c0c0c8.
  • Deeper carve: inset_3px_3px_6px_rgb(0_0_0/0.7).
  • Light neumorphism: invert the ladder and the shadow colours.

Gotchas — read before shipping

  • Keep the well 15%+ darker than the tray or the depth collapses.
  • Integer text-shadow offsets render consistently; sub-pixel ones don't.
  • The lamp is decorative; the radio announces the state.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

Box and text shadows are universal; :has() for panels.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Search CodeFronts

Loading…