TetraKits UI Floating Card Stack ← Library

Floating Card Stack

Layered floating UI cards with 3D translate offset on dot grid with Featured, Popular, New panels with backdrop blur and soft shadow. Split headline + stack layout, responsive lg:grid-cols-2.

floating cards uilayered card stack3d offset cardsproduct showcase sectiondot grid layout
Live preview

Dependencies

react lucide-react
npm install lucide-react
import { Bell, TrendingUp, Users } from "lucide-react";

const cards = [
  { icon: TrendingUp, label: "Revenue", value: "$12,480", sub: "+18% vs last week", x: "translate-x-0", y: "translate-y-0", z: "z-30" },
  { icon: Users, label: "New users", value: "847", sub: "62 from Product Hunt", x: "translate-x-4 sm:translate-x-8", y: "translate-y-3 sm:translate-y-4", z: "z-20" },
  { icon: Bell, label: "Alerts", value: "3", sub: "2 billing · 1 security", x: "translate-x-8 sm:translate-x-16", y: "translate-y-6 sm:translate-y-8", z: "z-10" },
];

export function FloatingStackFeatures() {
  return (
    <section className="relative overflow-hidden bg-[#FAFAFA] px-4 py-20 sm:px-6 lg:px-8">
      <div className="pointer-events-none absolute inset-0 bg-[radial-gradient(circle,#d4d4d8_1px,transparent_1px)] [background-size:20px_20px] opacity-40" aria-hidden />
      <div className="relative mx-auto grid max-w-5xl items-center gap-12 lg:grid-cols-2">
        <div>
          <h2 className="text-2xl font-semibold tracking-tight text-zinc-900 sm:text-3xl">Live ops at a glance</h2>
          <p className="mt-3 text-sm text-zinc-600">Real-time cards surface revenue, growth, and incidents — no tab switching.</p>
          <ul className="mt-6 space-y-2 text-sm text-zinc-500">
            <li>· Updates every 60 seconds from Stripe & analytics</li>
            <li>· Push alerts to Slack, email, or PagerDuty</li>
            <li>· Custom thresholds per workspace</li>
          </ul>
        </div>
        <div className="relative mx-auto h-64 w-full max-w-sm sm:h-72">
          {cards.map(({ icon: Icon, label, value, sub, x, y, z }) => (
            <div key={label} className={`absolute left-0 top-0 w-52 rounded-xl border border-zinc-200/80 bg-white/95 p-4 shadow-[0_12px_40px_rgba(0,0,0,0.08)] backdrop-blur-sm sm:w-56 ${x} ${y} ${z}`}>
              <div className="flex items-center gap-2">
                <Icon className="h-4 w-4 text-zinc-600" strokeWidth={1.5} />
                <span className="text-sm font-medium text-zinc-900">{label}</span>
              </div>
              <p className="mt-2 text-2xl font-semibold tabular-nums text-zinc-900">{value}</p>
              <p className="mt-1 text-xs text-zinc-500">{sub}</p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}