For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
Shadcn Labs/

Theme Toggle Button

A sun and moon icon button that toggles the theme with any transition style. A React dark mode toggle built on View Transitions, installed with the shadcn CLI.

Installation

$ pnpm dlx shadcn@latest add @transition-kit/theme-toggle-button

Usage

import { ThemeToggleButton } from "@/components/transitions/theme-toggle-button";
<ThemeToggleButton />
<ThemeToggleButton transition="circle-blur" />

API Reference

ThemeToggleButton

PropTypeDefaultDescription
transitionstringThe provider's transitionStyle slug such as "circle-reveal". Install the style first.
...propsComponentProps<"button">-Spread onto the <button>. Calling event.preventDefault() in onClick skips the theme change.