johuniq

Animated Theme Toggle

Buttons 102

About

Smooth dark/light mode toggle with sun-to-moon SVG morph animation. Built with Framer Motion and next-themes integration.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Animated Theme Toggle to your project and fits it to your theme.

Code

How Animated Theme Toggle is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { 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>
  )
}

Dependencies

More by johuniq

View all
  • Liquid Metal Button

    Liquid Metal Button

    3.4K
  • Date Wheel Picker

    Date Wheel Picker

    193
  • AI Prompt Box

    AI Prompt Box

    158
  • Joly Button

    Joly Button

    77

More in Buttons

View all
  • Texture Button

    Texture Button

    98
  • Button

    Button

    18
  • Eclipse Button

    Eclipse Button

    39
  • App Store Button

    App Store Button

    461
  • Button

    Button

    9
  • Button Group

    Button Group

    6
  • Base Button

    Base Button

    1
  • Button

    Button

    4