Theme Toggle

An animated dark/light mode toggle that flips the `dark` class and persists the choice.

utilityNew Releaseclass-variance-authorityframer-motionlucide-react

Installation

$npx futureuikit add theme-toggle

Import

import { ThemeToggle } from "@/components/ui/theme-toggle"
Layout Variant

Named Keys & Props

Pass these exact named keys as props on <ThemeToggle />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
shapeCorner shape
"default""square""rounded""sharp"
sizeComponent size
"sm""md""lg"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { ThemeToggle } from"@/components/ui/theme-toggle";

export default function Example() {
  return <ThemeToggle />;
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆An animated dark/light mode toggle that flips the dark class and persists the choice.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Install: Run 'npx futureuikit add theme-toggle'.
  • ◆Import: 'import { ThemeToggle } from "@/components/ui/theme-toggle";'