Theme Toggle

Preview

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" | "bottom-right" | "bottom-left" | "top-left" | "top-right" | "bottom-up"
Defaultbottom-up

ThemeToggle

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

Animation variant. Default: "rectangle".

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

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

Defaultbottom-up
iconClassName?
string
Default—
labels?
Partial<{ switchToLight: string; switchToDark: string; }>

Override any built-in string.

Default—
className?
string
Default—

Updated