Theme Toggle

Preview

Rectangle
Circle
Circle blur
Blinds

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/theme-toggle

API Reference

useThemeToggle

variant?
"circle" | "rectangle" | "circle-blur" | "blinds"
Defaultrectangle
start?
"center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "bottom-up"
Defaultbottom-up

ThemeToggle

variant?
"circle" | "rectangle" | "circle-blur" | "blinds"

Animation variant. Default: "rectangle".

Defaultrectangle
start?
"center" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "bottom-up"

Origin direction for the reveal. Default: "bottom-up".

Defaultbottom-up
iconClassName?
string
Default—
className?
string
Default—

Updated