About
An iOS-inspired Liquid Glass theme switcher featuring an elongated pill thumb that morphs into a crystal-clear refractive lens when pressed or dragged between light and dark modes.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Liquid Glass Theme Toggle to your project and fits it to your theme.
Code
How Liquid Glass Theme Toggle is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import React, { useState } from "react";
import { LiquidGlassThemeToggle } from "@/components/ui/liquid-glass-theme-toggle";
export default function Demo() {
const [theme, setTheme] = useState<"light" | "dark">("light");
return (
<div
className={`flex h-44 w-72 flex-col items-center justify-center gap-3 rounded-2xl border transition-colors duration-300 ${
theme === "dark"
? "border-zinc-800 bg-zinc-950 text-zinc-100"
: "border-zinc-200 bg-zinc-50 text-zinc-900"
}`}
>
<LiquidGlassThemeToggle theme={theme} onThemeChange={setTheme} />
<span className="text-xs font-medium opacity-60">
{theme === "dark" ? "Dark Mode" : "Light Mode"}
</span>
</div>
);
}


