1
3
Block

Theme Toggler

PreviousNext

An Animated theme toggler component, fully customizable using Tailwind CSS.

import { ThemeSwitcherToggle } from "@/components/ui/theme-switch-toggler"

export function ThemeSwitcherTogglerDemo() {
  return <ThemeSwitcherToggle />
}

Installation

pnpm dlx shadcn@latest add https://ebonui.com/r/theme-switch-toggler.json

Usage

import { ThemeSwitcherToggle } from "@/components/ui/theme-switch-toggler"
<ThemeSwitcherToggle />

Props

PropTypeDefaultDescription
classNameString" "Additional classes to be added to the component
durationNumber200Duration of the theme transition animation in milliseconds