03 / 36
All 36 in 36 Tailwind Stacked Cards
- 01Tailwind Scroll-Driven Scaling Card Stack
- 02Tailwind Swipe Card Deck Drag to Dismiss
- 03Tailwind Glassmorphism Testimonial Card Stack
- 04Tailwind Stacked Cards Expand Accordion on Click
- 05Tailwind Fan Out Photo Stack on Hover
- 06Tailwind 3D Perspective Tilt Card Stack
- 07Tailwind Multi Step Form Card Stack
- 08Tailwind Tabbed Card Stack Bring to Front
- 09Tailwind Click to Front Stacked Cards Cycle
- 10Tailwind Classic Card Deck Stack Shadow
- 11Tailwind Fan Spread Hand of Cards
- 12Tailwind Polaroid Photo Stack Scattered Rotate
- 13Tailwind Staircase Offset Stacked Cards Cascade
- 14Tailwind Cards Spread Out Horizontally on Hover
- 15Tailwind Stacked Cards Lift on Hover Sibling Push
- 16Tailwind Accordion Stacked Cards Slide Out Menu
- 17Tailwind Shuffle Cards Animation Loop Deck
- 18Tailwind File Folder Tab Stacked Cards
- 19Tailwind Scattered Photos Pinch to Centre on Hover
- 20Tailwind Mobile Swipe Card Stack Translate3d
- 21Tailwind Single Accordion Card Nested Layers
- 22Tailwind Isometric Tower Stacked Cards 3D Column
- 23Tailwind 3D Flip Card Stack Reveal Back
- 24Tailwind Card Stack Tilt on Hover Quadrant
- 25Tailwind Notification Stack Pile Dismiss
- 26Tailwind Receipt Roll Unroll Stacked Items
- 27Tailwind Scratch Card Reveal Canvas Mask
- 28Tailwind Stacked Cards Hover Reveal Spread
- 29Tailwind Scroll Activated Sticky Stacking Cards
- 30Tailwind Stacked Testimonial Slider Radio
- 31Tailwind Isometric Overlapping Stacked Cards
- 32Tailwind Bento Grid Stacked Cards Hover Fan
- 33Tailwind Perspective Card Deck Depth Tunnel
- 34Tailwind Peel Back Corner Card Reveal
- 35Tailwind Timeline Stacked Milestone Cards
- 36Tailwind Spiral Tower Rotating Stacked Cards
Tailwind Glassmorphism Testimonial Card Stack
A frosted pile over a slowly drifting gradient. backdrop-blur-[16px] backdrop-saturate-150 is one of the few places Tailwind's utility is genuinely nicer than the property — the -webkit- prefix ships automatically. The resting scatter rides each card as --x/--y/--r, and the spread is a group-hover: / group-focus-within: pair of arbitrary transforms, so the whole choreography sits on the three cards instead of in six selectors.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="stk-03 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk03-sans bg-linear-[125deg,var(--color-stk03-g1),var(--color-stk03-g2),var(--color-stk03-g3)] bg-[size:220%_220%] animate-stk03-flow motion-reduce:animate-none" aria-label="Glassmorphic testimonial stack">
<div class="group relative w-[min(360px,100%)] h-75">
<figure class="absolute inset-0 z-3 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-[transform,box-shadow] duration-500 ease-stk03 group-hover:[transform:translate(0,-14px)_rotate(0deg)] group-focus-within:[transform:translate(0,-14px)_rotate(0deg)] group-hover:shadow-[0_34px_60px_-26px_rgba(20,10,50,0.7)] motion-reduce:duration-200" style="--x:0px;--y:0px;--r:0deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“This shipped our redesign a full sprint early. The polish is unreal.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av1 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">MK</span>
<span><b class="block font-bold">Maya K.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Head of Design, Northwind</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-2 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(46px,30px)_rotate(7deg)] group-focus-within:[transform:translate(46px,30px)_rotate(7deg)] motion-reduce:duration-200" style="--x:22px;--y:14px;--r:4deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Dependency-free and gorgeous. Our Lighthouse score didn’t budge.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av2 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">JL</span>
<span><b class="block font-bold">Jon L.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Staff Engineer, Fathom</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-1 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(-44px,44px)_rotate(-8deg)] group-focus-within:[transform:translate(-44px,44px)_rotate(-8deg)] motion-reduce:duration-200" style="--x:-20px;--y:26px;--r:-5deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Clients think we hired a motion studio. It’s one stylesheet.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av3 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">RA</span>
<span><b class="block font-bold">Reese A.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Founder, Studio Arc</a></span>
</figcaption>
</figure>
</div>
</section><section class="stk-03 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk03-sans bg-linear-[125deg,var(--color-stk03-g1),var(--color-stk03-g2),var(--color-stk03-g3)] bg-[size:220%_220%] animate-stk03-flow motion-reduce:animate-none" aria-label="Glassmorphic testimonial stack">
<div class="group relative w-[min(360px,100%)] h-75">
<figure class="absolute inset-0 z-3 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-[transform,box-shadow] duration-500 ease-stk03 group-hover:[transform:translate(0,-14px)_rotate(0deg)] group-focus-within:[transform:translate(0,-14px)_rotate(0deg)] group-hover:shadow-[0_34px_60px_-26px_rgba(20,10,50,0.7)] motion-reduce:duration-200" style="--x:0px;--y:0px;--r:0deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“This shipped our redesign a full sprint early. The polish is unreal.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av1 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">MK</span>
<span><b class="block font-bold">Maya K.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Head of Design, Northwind</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-2 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(46px,30px)_rotate(7deg)] group-focus-within:[transform:translate(46px,30px)_rotate(7deg)] motion-reduce:duration-200" style="--x:22px;--y:14px;--r:4deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Dependency-free and gorgeous. Our Lighthouse score didn’t budge.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av2 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">JL</span>
<span><b class="block font-bold">Jon L.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Staff Engineer, Fathom</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-1 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(-44px,44px)_rotate(-8deg)] group-focus-within:[transform:translate(-44px,44px)_rotate(-8deg)] motion-reduce:duration-200" style="--x:-20px;--y:26px;--r:-5deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Clients think we hired a motion studio. It’s one stylesheet.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av3 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">RA</span>
<span><b class="block font-bold">Reese A.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Founder, Studio Arc</a></span>
</figcaption>
</figure>
</div>
</section>@import "tailwindcss";
@theme {
--color-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}@import "tailwindcss";
@theme {
--color-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}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-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}@import "tailwindcss";
@theme {
--color-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@75..125,400;75..125,600;75..125,700&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=Archivo:wdth,wght@75..125,400;75..125,600;75..125,700&family=JetBrains+Mono:wght@400;500&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
- The webfonts load as
<link>tags insetup, not as an@importinside the stylesheet. Tailwind emits user@importrules after its own@layerblocks, and a late@importis invalid CSS — the browser drops it and the demo silently falls back to system fonts. backdrop-blur-[16px] backdrop-saturate-150compose into onebackdrop-filterand the-webkit-prefix arrives free — the rare case where the utility is less error-prone than the property.- The border-plus-inset-shadow rim becomes
ring-1 ring-inset ring-white/40, one utility instead of two declarations. - Six
:hover .card:nth-child(n)rules collapse into per-cardgroup-hover:[transform:…], with the resting position on the same element as--x/--y/--r. group-focus-within:replaces the pile's:focus-visible: because each quote now carries a real focusable citation link, the pile opens for keyboard users without needingtabindexon a<div>.- The stylesheet keeps only the gradient
@keyframes; the 16-second timing lives in the--animate-*token so the root needs one class. - Reduced motion is two variants rather than a media block:
motion-reduce:animate-nonefreezes the gradient andmotion-reduce:duration-200shortens the lift.
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 Glassmorphism Testimonial Card Stack
Source: https://codefronts.com/components/tailwind-stacked-cards/tailwind-glassmorphism-testimonial-card-stack/
A frosted pile over a slowly drifting gradient. backdrop-blur-[16px] backdrop-saturate-150 is one of the few places Tailwind's utility is genuinely nicer than the property — the -webkit- prefix ships automatically. The resting scatter rides each card as --x/--y/--r, and the spread is a group-hover: / group-focus-within: pair of arbitrary transforms, so the whole choreography sits on the three cards instead of in six selectors.
## HTML
```html
<section class="stk-03 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk03-sans bg-linear-[125deg,var(--color-stk03-g1),var(--color-stk03-g2),var(--color-stk03-g3)] bg-[size:220%_220%] animate-stk03-flow motion-reduce:animate-none" aria-label="Glassmorphic testimonial stack">
<div class="group relative w-[min(360px,100%)] h-75">
<figure class="absolute inset-0 z-3 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-[transform,box-shadow] duration-500 ease-stk03 group-hover:[transform:translate(0,-14px)_rotate(0deg)] group-focus-within:[transform:translate(0,-14px)_rotate(0deg)] group-hover:shadow-[0_34px_60px_-26px_rgba(20,10,50,0.7)] motion-reduce:duration-200" style="--x:0px;--y:0px;--r:0deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“This shipped our redesign a full sprint early. The polish is unreal.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av1 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">MK</span>
<span><b class="block font-bold">Maya K.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Head of Design, Northwind</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-2 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(46px,30px)_rotate(7deg)] group-focus-within:[transform:translate(46px,30px)_rotate(7deg)] motion-reduce:duration-200" style="--x:22px;--y:14px;--r:4deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Dependency-free and gorgeous. Our Lighthouse score didn’t budge.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av2 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">JL</span>
<span><b class="block font-bold">Jon L.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Staff Engineer, Fathom</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-1 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(-44px,44px)_rotate(-8deg)] group-focus-within:[transform:translate(-44px,44px)_rotate(-8deg)] motion-reduce:duration-200" style="--x:-20px;--y:26px;--r:-5deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Clients think we hired a motion studio. It’s one stylesheet.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av3 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">RA</span>
<span><b class="block font-bold">Reese A.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Founder, Studio Arc</a></span>
</figcaption>
</figure>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
```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 Glassmorphism Testimonial Card Stack
Source: https://codefronts.com/components/tailwind-stacked-cards/tailwind-glassmorphism-testimonial-card-stack/
A frosted pile over a slowly drifting gradient. backdrop-blur-[16px] backdrop-saturate-150 is one of the few places Tailwind's utility is genuinely nicer than the property — the -webkit- prefix ships automatically. The resting scatter rides each card as --x/--y/--r, and the spread is a group-hover: / group-focus-within: pair of arbitrary transforms, so the whole choreography sits on the three cards instead of in six selectors.
## HTML
```html
<section class="stk-03 w-full min-h-svh flex items-center justify-center px-5 py-15 font-stk03-sans bg-linear-[125deg,var(--color-stk03-g1),var(--color-stk03-g2),var(--color-stk03-g3)] bg-[size:220%_220%] animate-stk03-flow motion-reduce:animate-none" aria-label="Glassmorphic testimonial stack">
<div class="group relative w-[min(360px,100%)] h-75">
<figure class="absolute inset-0 z-3 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-[transform,box-shadow] duration-500 ease-stk03 group-hover:[transform:translate(0,-14px)_rotate(0deg)] group-focus-within:[transform:translate(0,-14px)_rotate(0deg)] group-hover:shadow-[0_34px_60px_-26px_rgba(20,10,50,0.7)] motion-reduce:duration-200" style="--x:0px;--y:0px;--r:0deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“This shipped our redesign a full sprint early. The polish is unreal.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av1 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">MK</span>
<span><b class="block font-bold">Maya K.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Head of Design, Northwind</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-2 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(46px,30px)_rotate(7deg)] group-focus-within:[transform:translate(46px,30px)_rotate(7deg)] motion-reduce:duration-200" style="--x:22px;--y:14px;--r:4deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Dependency-free and gorgeous. Our Lighthouse score didn’t budge.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av2 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">JL</span>
<span><b class="block font-bold">Jon L.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Staff Engineer, Fathom</a></span>
</figcaption>
</figure>
<figure class="absolute inset-0 z-1 flex flex-col justify-between p-[26px_24px] rounded-[22px] bg-white/16 backdrop-blur-[16px] backdrop-saturate-150 ring-1 ring-inset ring-white/40 shadow-[0_20px_45px_-22px_rgba(20,10,50,0.5)] text-white [transform:translate(var(--x),var(--y))_rotate(var(--r))] transition-transform duration-500 ease-stk03 group-hover:[transform:translate(-44px,44px)_rotate(-8deg)] group-focus-within:[transform:translate(-44px,44px)_rotate(-8deg)] motion-reduce:duration-200" style="--x:-20px;--y:26px;--r:-5deg">
<blockquote class="m-0 text-[17px] font-semibold leading-snug [text-shadow:0_1px_12px_rgba(30,10,60,0.35)]">“Clients think we hired a motion studio. It’s one stylesheet.”</blockquote>
<figcaption class="flex items-center gap-3 text-[13px]">
<span class="grid place-items-center size-9.5 shrink-0 rounded-full bg-stk03-av3 text-[13px] font-bold text-white ring-1 ring-inset ring-white/50">RA</span>
<span><b class="block font-bold">Reese A.</b><a class="text-white/85 underline decoration-white/40 decoration-1 underline-offset-2 text-xs hover:text-white hover:decoration-white focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2 rounded-xs" href="#">Founder, Studio Arc</a></span>
</figcaption>
</figure>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-stk03-g1: #a259d9;
--color-stk03-g1: oklch(0.60 0.20 300);
--color-stk03-g2: #34a8e0;
--color-stk03-g2: oklch(0.68 0.19 210);
--color-stk03-g3: #f0894a;
--color-stk03-g3: oklch(0.72 0.18 30);
--color-stk03-av1: #ef7a63;
--color-stk03-av1: oklch(0.70 0.18 20);
--color-stk03-av2: #3fa9dc;
--color-stk03-av2: oklch(0.70 0.16 200);
--color-stk03-av3: #4cc48a;
--color-stk03-av3: oklch(0.72 0.16 140);
--font-stk03-sans: 'Archivo', system-ui, sans-serif;
--ease-stk03: cubic-bezier(0.2, 0.8, 0.2, 1);
--animate-stk03-flow: stk-03-flow 16s ease-in-out infinite;
}
/* The gradient drift: keyframes have no utility form. Everything else in this
demo — including the -webkit-backdrop-filter twin — the compiler emits. */
@keyframes stk-03-flow {
0%,
100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
```How this works
The glass is the easy part. backdrop-blur-* and backdrop-saturate-* compose into a single backdrop-filter, and the compiler emits the -webkit- twin that older Safari needs — a line you have to remember by hand in plain CSS. What you must still get right is the layer underneath: bg-white/16, not a solid fill, or there is nothing for the blur to sample.
The scatter is data; the spread is a variant. Each card declares where it rests and the utility reads it:
<figure style="--x:22px;--y:14px;--r:4deg"
class="[transform:translate(var(--x),var(--y))_rotate(var(--r))]
group-hover:[transform:translate(46px,30px)_rotate(7deg)]">Rest and hover sit two classes apart, which makes the choreography reviewable in a way six scattered :nth-child rules are not.
group-focus-within: is the accessible half of group-hover:. The CSS version reaches for :focus-visible on the pile, which only fires if the pile itself is focusable. Because each quote here carries a real focusable citation link, group-focus-within: is the truer variant: the pile opens when a keyboard user arrives anywhere inside it.
Contrast over glass needs deliberate care. Frosted panels lower effective contrast, and a drifting gradient means the number changes as it moves. Text stays at full opacity with a soft shadow rather than being dimmed to fit the aesthetic.
Make it yours
- Dial the frost with
backdrop-blur-[16px]and thebg-white/16alpha; they move in opposite directions — more blur wants less white. - Change the resting spread through each card's
--x/--y/--r, all three visible on the element. - Retarget the hover fan by editing the per-card
group-hover:[transform:…]; no shared rule to keep in sync. - Swap the gradient stops for your brand palette in the root's
bg-linear-[125deg,…]. - Add a card by copying one
<figure>, giving it a resting scatter and a hover destination — unlike the CSS version there is no:nth-childmap to extend.
Gotchas — read before shipping
backdrop-blurneeds something translucent above it. A solidbg-*utility hides the effect completely — use an opacity modifier.- Keep the
ring-1 ring-inset ring-white/40rim. Flat glass with no hairline reads as cheap grey, whatever the blur radius. - Text over glass must stay at full opacity. Dimming it to
text-white/70looks right in a screenshot and fails AA in motion. animate-stk03-flowneeds abg-[size:220%_220%]to have room to travel; without an oversized background the position animation does nothing.- Arbitrary transforms cannot contain spaces —
[transform:translate(46px,30px)_rotate(7deg)]uses the underscore escape between functions. backdrop-filterforces a new stacking and containing context. Anything you expect to escape the card (a tooltip, a wide glow) will be clipped by it.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
backdrop-filter is Chrome 76+, Safari 9+ with the -webkit- prefix Tailwind emits for you, Firefox 103+. The effective floor is Tailwind v4's own generated sheet.