27 / 51
All 51 in 51 Tailwind CSS Buttons
- 01Tailwind Submit Button (Form Primary)
- 02Tailwind Primary and Secondary Button Pair
- 03Tailwind Ghost / Outline Button
- 04Tailwind Icon-Only Button with Accessible Tooltip
- 05Tailwind Gradient CTA Button
- 06Tailwind Loading Spinner Button (State Transition)
- 07Tailwind Disabled Button State (Full State Reference)
- 08Tailwind Button Group Component (Segmented Radio-Like)
- 09Tailwind Add to Cart Button
- 10Tailwind Download Progress Button
- 11Tailwind Like Heart Button
- 12Tailwind Confirm Delete Button
- 13Tailwind Play Pause Button
- 14Tailwind Subscribe Confetti Button
- 15Tailwind Magnetic Mercury Ripple Button
- 16Tailwind Brutalist Glitch Button
- 17Tailwind Neon Plasma Burst Button
- 18Tailwind Clay Press Button
- 19Tailwind Editorial Ink Spread Button
- 20Tailwind Particle Shard Burst Button
- 21Tailwind Brushed Brass Plate Button
- 22Tailwind Washi Paper Crane Button
- 23Tailwind Frosted Ice Cube Button
- 24Tailwind Vintage Typewriter Key Button
- 25Tailwind Lacquered Walnut Wood Button
- 26Tailwind Pharma Gel Capsule Button
- 27Tailwind Aged Copper Coin Button
- 28Tailwind Origami Fortune Cookie Button
- 29Tailwind Holographic Foil Sticker Button
- 30Tailwind Brutalist Concrete Slab Button
- 31Tailwind Mercury Bead Morph Button
- 32Tailwind Soft Pill Modern SaaS Button
- 33Tailwind Masking Tape Label Button
- 34Tailwind Obsidian Glass Shard Button
- 35Tailwind Wine Velvet Ribbon Button
- 36Tailwind LED Segment Display Button
- 37Tailwind Cassette Mixtape Label Button
- 38Tailwind Chalkboard Menu Button
- 39Tailwind Vinyl Record Sleeve Ripple Button
- 40Tailwind Polaroid Snapshot Button
- 41Tailwind Airline Boarding Pass Button
- 42Tailwind Aged Brass Subway Token Button
- 43Tailwind Vintage Rx Pharmacy Label Button
- 44Tailwind Bakelite Radio Dial Toggle Button
- 45Tailwind Regal Postage Stamp Button
- 46Tailwind Victorian Cigar Band Foil Button
- 47Tailwind Vintage Calculator Key Button
- 48Tailwind Toolbox Latch Spotlight Button
- 49Tailwind Receipt Paper Total Count-Up Button
- 50Tailwind IBM Punch Card Magnetic Follow Button
- 51Tailwind Brass Periscope Lens Button
Tailwind Aged Copper Coin Button
A struck copper coin with a milled edge, verdigris patina blooming in the low spots, and a real 3D flip to its reverse face. v4 ships transform-3d, backface-hidden, perspective-* and rotate-y-* as utilities, so the entire flip construction ports — which it could not have done in v3.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<div class="tb-27 w-full min-h-svh grid place-items-center perspective-[900px] font-tb27-serif p-[clamp(1.5rem,6vw,4rem)]">
<label class="group relative block cursor-pointer size-34 [-webkit-tap-highlight-color:transparent]">
<input type="checkbox" aria-label="Flip the coin to see the reverse" class="sr-only">
<span aria-hidden="true" class="relative block size-full transform-3d transition-[transform,translate] duration-[850ms] ease-tb27-out group-hover:-translate-y-[3px] group-active:scale-[0.97] group-has-checked:rotate-y-180 group-has-focus-visible:outline-2 group-has-focus-visible:outline-offset-[6px] group-has-focus-visible:outline-tb27-cu-hi group-has-focus-visible:rounded-full motion-reduce:transition-none">
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<span class="relative z-30 text-2xl font-bold tracking-[0.12em] tabular-nums [text-shadow:0_1px_0_#ffffff6b,0_-1px_0_#00000073]">1892</span>
</span>
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden rotate-y-180 text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="relative z-30 w-[36%] h-[36%] drop-shadow-[0_1px_0_#ffffff66]"><path d="M12 3.5 14.4 9l5.6.6-4.2 3.8 1.2 5.6L12 16.3 7 19l1.2-5.6L4 9.6 9.6 9 12 3.5z"/></svg>
</span>
</span>
</label>
</div><div class="tb-27 w-full min-h-svh grid place-items-center perspective-[900px] font-tb27-serif p-[clamp(1.5rem,6vw,4rem)]">
<label class="group relative block cursor-pointer size-34 [-webkit-tap-highlight-color:transparent]">
<input type="checkbox" aria-label="Flip the coin to see the reverse" class="sr-only">
<span aria-hidden="true" class="relative block size-full transform-3d transition-[transform,translate] duration-[850ms] ease-tb27-out group-hover:-translate-y-[3px] group-active:scale-[0.97] group-has-checked:rotate-y-180 group-has-focus-visible:outline-2 group-has-focus-visible:outline-offset-[6px] group-has-focus-visible:outline-tb27-cu-hi group-has-focus-visible:rounded-full motion-reduce:transition-none">
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<span class="relative z-30 text-2xl font-bold tracking-[0.12em] tabular-nums [text-shadow:0_1px_0_#ffffff6b,0_-1px_0_#00000073]">1892</span>
</span>
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden rotate-y-180 text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="relative z-30 w-[36%] h-[36%] drop-shadow-[0_1px_0_#ffffff66]"><path d="M12 3.5 14.4 9l5.6.6-4.2 3.8 1.2 5.6L12 16.3 7 19l1.2-5.6L4 9.6 9.6 9 12 3.5z"/></svg>
</span>
</span>
</label>
</div>@import "tailwindcss";
@theme {
--color-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}@import "tailwindcss";
@theme {
--color-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}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-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}@import "tailwindcss";
@theme {
--color-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}<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=Cinzel:wght@600;700&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=Cinzel:wght@600;700&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
- Utilities: the entire 3D flip (
perspective-*,transform-3d,backface-hidden,rotate-y-180), the milled edge gradient and its mask, the embossed numerals, hover lift, press, focus. CSS: the struck-metal speculars, the blended patina, and the-webkit-maskshim. - v4's 3D transform utilities are what make this port possible at all. In v3 the flip needed
[transform-style:preserve-3d]and[backface-visibility:hidden]as arbitrary properties; now they are first-class, and a construction that used to be "obviously CSS" is comfortably utilities. - The milled edge is a long arbitrary value that stays a utility, against the pattern of demos 21–25, because its two angles are the reed count — a number with design meaning. The patina's three blotch positions are not, so they don't.
mix-blend-mode: color-burnhas no utility (v4 shipsmix-blend-*for the common modes but the blend depends onisolateon the same element to be safe). Keeping the pair together in CSS is what guarantees the green never leaks onto the page.
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 Aged Copper Coin Button
Source: https://codefronts.com/components/tailwind-css-buttons/tailwind-aged-copper-coin-button/
A struck copper coin with a milled edge, verdigris patina blooming in the low spots, and a real 3D flip to its reverse face. v4 ships transform-3d, backface-hidden, perspective-* and rotate-y-* as utilities, so the entire flip construction ports — which it could not have done in v3.
## HTML
```html
<div class="tb-27 w-full min-h-svh grid place-items-center perspective-[900px] font-tb27-serif p-[clamp(1.5rem,6vw,4rem)]">
<label class="group relative block cursor-pointer size-34 [-webkit-tap-highlight-color:transparent]">
<input type="checkbox" aria-label="Flip the coin to see the reverse" class="sr-only">
<span aria-hidden="true" class="relative block size-full transform-3d transition-[transform,translate] duration-[850ms] ease-tb27-out group-hover:-translate-y-[3px] group-active:scale-[0.97] group-has-checked:rotate-y-180 group-has-focus-visible:outline-2 group-has-focus-visible:outline-offset-[6px] group-has-focus-visible:outline-tb27-cu-hi group-has-focus-visible:rounded-full motion-reduce:transition-none">
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<span class="relative z-30 text-2xl font-bold tracking-[0.12em] tabular-nums [text-shadow:0_1px_0_#ffffff6b,0_-1px_0_#00000073]">1892</span>
</span>
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden rotate-y-180 text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="relative z-30 w-[36%] h-[36%] drop-shadow-[0_1px_0_#ffffff66]"><path d="M12 3.5 14.4 9l5.6.6-4.2 3.8 1.2 5.6L12 16.3 7 19l1.2-5.6L4 9.6 9.6 9 12 3.5z"/></svg>
</span>
</span>
</label>
</div>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}
```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 Aged Copper Coin Button
Source: https://codefronts.com/components/tailwind-css-buttons/tailwind-aged-copper-coin-button/
A struck copper coin with a milled edge, verdigris patina blooming in the low spots, and a real 3D flip to its reverse face. v4 ships transform-3d, backface-hidden, perspective-* and rotate-y-* as utilities, so the entire flip construction ports — which it could not have done in v3.
## HTML
```html
<div class="tb-27 w-full min-h-svh grid place-items-center perspective-[900px] font-tb27-serif p-[clamp(1.5rem,6vw,4rem)]">
<label class="group relative block cursor-pointer size-34 [-webkit-tap-highlight-color:transparent]">
<input type="checkbox" aria-label="Flip the coin to see the reverse" class="sr-only">
<span aria-hidden="true" class="relative block size-full transform-3d transition-[transform,translate] duration-[850ms] ease-tb27-out group-hover:-translate-y-[3px] group-active:scale-[0.97] group-has-checked:rotate-y-180 group-has-focus-visible:outline-2 group-has-focus-visible:outline-offset-[6px] group-has-focus-visible:outline-tb27-cu-hi group-has-focus-visible:rounded-full motion-reduce:transition-none">
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<span class="relative z-30 text-2xl font-bold tracking-[0.12em] tabular-nums [text-shadow:0_1px_0_#ffffff6b,0_-1px_0_#00000073]">1892</span>
</span>
<span class="tb-27__face absolute inset-0 grid place-items-center isolate overflow-hidden rounded-full backface-hidden rotate-y-180 text-tb27-ink shadow-[inset_0_2px_4px_#ffffff59,inset_0_-3px_6px_#00000066,0_16px_26px_-12px_#000000b3]">
<span class="absolute inset-0 z-20 rounded-full opacity-90 bg-[repeating-conic-gradient(from_0deg,var(--color-tb27-reed-hi)_0deg_1.5deg,var(--color-tb27-reed-lo)_1.5deg_3deg)] [mask-image:radial-gradient(farthest-side,transparent_calc(100%-6px),#000_calc(100%-6px))]"></span>
<span class="tb-27__patina absolute inset-0 z-10 rounded-full opacity-55"></span>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="relative z-30 w-[36%] h-[36%] drop-shadow-[0_1px_0_#ffffff66]"><path d="M12 3.5 14.4 9l5.6.6-4.2 3.8 1.2 5.6L12 16.3 7 19l1.2-5.6L4 9.6 9.6 9 12 3.5z"/></svg>
</span>
</span>
</label>
</div>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tb27-bg: #1c2420;
--color-tb27-bg: oklch(0.24 0.02 160);
--color-tb27-cu: #b06a3c;
--color-tb27-cu: oklch(0.6 0.11 48);
--color-tb27-cu-hi: #e8a76d;
--color-tb27-cu-hi: oklch(0.78 0.1 62);
--color-tb27-cu-lo: #6d3c1c;
--color-tb27-cu-lo: oklch(0.4 0.09 45);
--color-tb27-patina: #3f8f74;
--color-tb27-patina: oklch(0.6 0.09 165);
--color-tb27-ink: #33180a;
--color-tb27-ink: oklch(0.26 0.06 45);
--color-tb27-reed-hi: #dc9a63;
--color-tb27-reed-hi: oklch(0.73 0.1 58);
--color-tb27-reed-lo: #7d4623;
--color-tb27-reed-lo: oklch(0.44 0.09 46);
--font-tb27-serif: "Cinzel", ui-serif, Georgia, "Times New Roman", serif;
--ease-tb27-out: cubic-bezier(0.16, 1, 0.3, 1);
}
.tb-27 {
width: 100%;
min-height: 100vh;
min-height: 100svh;
background: radial-gradient(34rem 22rem at 50% 42%, color-mix(in oklab, var(--color-tb27-cu) 16%, transparent), transparent 72%), var(--color-tb27-bg);
}
/* STRUCK METAL: two offset speculars over a diagonal base. */
.tb-27__face {
background: radial-gradient(circle at 32% 26%, var(--color-tb27-cu-hi), transparent 52%), radial-gradient(circle at 70% 78%, var(--color-tb27-cu-lo), transparent 55%), linear-gradient(150deg, var(--color-tb27-cu), color-mix(in oklab, var(--color-tb27-cu) 78%, black));
}
/* PATINA: three blotches in the low spots, blended into the metal rather than
painted on. color-burn has no utility form, and shouldn't. */
.tb-27__patina {
mix-blend-mode: color-burn;
background: radial-gradient(2.4rem 1.8rem at 22% 72%, var(--color-tb27-patina), transparent 70%), radial-gradient(1.8rem 2.2rem at 78% 30%, var(--color-tb27-patina), transparent 72%), radial-gradient(1.2rem 1rem at 58% 84%, var(--color-tb27-patina), transparent 70%);
}
/* Safari ≤15.3 mask shim. */
.tb-27 [class*="mask-image"] {
-webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
}
@media (prefers-color-scheme: light) {
.tb-27:not([data-theme="dark"]) {
--color-tb27-bg: oklch(0.32 0.025 160);
}
}
.tb-27[data-theme="light"] {
--color-tb27-bg: oklch(0.32 0.025 160);
}
@media (forced-colors: active) {
.tb-27__face {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonText;
box-shadow: none;
}
.tb-27__patina,
.tb-27__face > span:first-child {
display: none;
}
}
```How this works
This is the demo v4's 3D utilities unlock. The standard two-face construction — transform-style:preserve-3d on the rotator, backface-visibility:hidden on both faces, one rotated 180° at rest — is now a class list:
<span class="transform-3d transition-transform group-has-checked:rotate-y-180">
<span class="absolute inset-0 backface-hidden">…front…</span>
<span class="absolute inset-0 backface-hidden rotate-y-180">…back…</span>
</span>The milled edge is the one gradient worth keeping as a utility despite its length: the two angles are the reed count (1.5°/3° = 120 reeds), so it is a number a designer changes. The patina's three blended blotches are not, and they stay in CSS.
The checkbox carries the state. A flip is not an announcement — "checked" is what a screen reader reports, so the label says what flipping means.
Make it yours
- Reed count is the two conic angles: 1.5°/3° = 120 reeds, 3°/6° = 60.
- Silver or gold: edit the three metal tokens and lower the patina opacity.
- Coin toss: swap both
rotate-y-180s forrotate-x-180. - Any icon works on the reverse — the back face is a normal grid cell.
- Flip duration lives on the rotator; 850ms is deliberately heavy, like real metal.
Gotchas — read before shipping
transform-3don the rotator andbackface-hiddenon both faces. Miss either and you see mirrored type.perspective-*belongs on the parent. On the rotating element itself the flip looks like a 2D squash.mix-blend-modeblends against the nearest stacking context —isolateon the face is mandatory, or the patina tints the page.- The reed mask needs the same radius maths as the coin, or there is a visible seam at the rim.
- A flip conveys nothing to assistive tech. Label the checkbox with what the state means.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
repeating-conic-gradient (Chrome 69 / Safari 12.1 / Firefox 83) and :has() (Chrome 105 / Safari 15.4 / Firefox 121) are both below Tailwind v4's floor. The 3D transform utilities are v4-only.