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/

Circle Reveal

An expanding circle reveals the new theme from the click point. A React dark mode transition built on View Transitions, installed with the shadcn CLI.

Installation

$ pnpm dlx shadcn@latest add @transition-kit/theme/circle-reveal

Usage

<ThemeTransitionProvider transition="circle-reveal">
  {children}
</ThemeTransitionProvider>
const { toggleTheme } = useThemeTransition();
 
<button
  type="button"
  onClick={(event) =>
    toggleTheme({ transition: "circle-reveal", origin: event })
  }
>
  Toggle theme
</button>;

API Reference

PropTypeDefaultDescription
transitionstringThe provider's transition"circle-reveal" for this style: on the provider for every change, or per change with setTheme / toggleTheme.
durationnumber1000Milliseconds on the provider. Overrides this style's 1000ms timing. Edit var(--tk-theme-duration, 1000ms) in the style's CSS to change only this style.
easingstringease-in-outEasing on the provider. Overrides this style's easing. Edit var(--tk-theme-easing, ease-in-out) in the style's CSS to change only this style.
origin{ clientX: number; clientY: number } | ElementThe viewport centrePass the click event to start at the pointer, or an element to start at its centre.