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 Switch

A switch that flips between light and dark 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-switch

Usage

import { ThemeToggleSwitch } from "@/components/transitions/theme-toggle-switch";
<ThemeToggleSwitch />
<ThemeToggleSwitch transition="star-reveal" />

API Reference

ThemeToggleSwitch

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.