About
An interactive Apple iOS 26 inspired Liquid Glass button with real-time SVG convex lens refraction, chromatic rim dispersion, touch-reactive internal illumination, and rubber-band squash-and-stretch spring physics.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Liquid Glass Button to your project and fits it to your theme.
Code
How Liquid Glass Button is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import React, { useState } from "react";
import { Play, X, Sparkles } from "lucide-react";
import { LiquidGlassButton } from "@/components/ui/liquid-glass-button";
export function DemoOne() {
const [backdrop, setBackdrop] = useState<"media" | "checker" | "grid">("media");
return (
<div className="flex w-full max-w-2xl flex-col items-center gap-4 p-4">
<div
className="relative flex h-[350px] w-full flex-col items-center justify-center gap-5 overflow-hidden rounded-[32px] border border-zinc-200/80 shadow-md dark:border-zinc-800"
style={
backdrop === "media"
? {
backgroundImage:
"url('https://cdn.21st.dev/assets/mirror/f5/f5371c49249764e1b0a07d85caaaf62b7c3227642b94038d404492f0c132f329.jpg')",
backgroundSize: "cover",
backgroundPosition: "center",
}
: backdrop === "checker"
? {
backgroundColor: "#ffffff",
backgroundImage:
"linear-gradient(45deg, #141416 25%, transparent 25%), linear-gradient(-45deg, #141416 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #141416 75%), linear-gradient(-45deg, transparent 75%, #141416 75%)",
backgroundSize: "48px 48px",
backgroundPosition: "0 0, 0 24px, 24px -24px, -24px 0px",
}
: {
backgroundColor: "#f4f4f5",
backgroundImage:
"linear-gradient(to right, rgba(24,24,27,0.14) 1px, transparent 1px), linear-gradient(to bottom, rgba(24,24,27,0.14) 1px, transparent 1px)",
backgroundSize: "20px 20px",
}
}
>
<LiquidGlassButton variant="clear" ariaLabel="Play">
<Play className="h-4 w-4 fill-current" />
<span>Play</span>
</LiquidGlassButton>
<LiquidGlassButton variant="clear" size="icon" ariaLabel="Close">
<X className="h-[22px] w-[22px]" strokeWidth={3.0} />
</LiquidGlassButton>
<LiquidGlassButton variant="regular" ariaLabel="Continue">
<Sparkles className="h-4 w-4 stroke-[2]" />
<span>Continue</span>
</LiquidGlassButton>
<div className="absolute bottom-4 flex gap-1 rounded-full bg-black/55 p-1 text-xs font-medium text-white backdrop-blur-md">
{(["media", "checker", "grid"] as const).map((mode) => (
<button
key={mode}
type="button"
onClick={() => setBackdrop(mode)}
className={`cursor-pointer rounded-full px-3 py-1 capitalize transition ${
backdrop === mode
? "bg-white text-zinc-950"
: "text-white/80 hover:text-white"
}`}
>
{mode}
</button>
))}
</div>
</div>
</div>
);
}
export default DemoOne;













