Components
Loading preview...
Smooth dark/light mode toggle with sun-to-moon SVG morph animation. Built with Framer Motion and next-themes integration.
npx shadcn@latest add https://21st.dev/r/johuniq/animated-theme-toggleimport { ThemeProvider } from "next-themes"
import { AnimatedThemeToggle } from "@/components/ui/animated-theme-toggle"
export default function AnimatedThemeToggleDemo() {
return (
<ThemeProvider attribute="class" defaultTheme="dark">
<div className="flex items-center justify-center min-h-screen bg-background p-8">
<AnimatedThemeToggle />
</div>
</ThemeProvider>
)
}