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/

Diagonal Wipe

A diagonal band sweeps across the viewport. A React dark mode transition built on View Transitions, installed with the shadcn CLI.

Installation

$ pnpm dlx shadcn@latest add @transition-kit/theme/diagonal-wipe

Usage

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

API Reference

PropTypeDefaultDescription
transitionstringThe provider's transition"diagonal-wipe" for this style: on the provider for every change, or per change with setTheme / toggleTheme.
durationnumber600Milliseconds on the provider. Overrides this style's 600ms timing. Edit var(--tk-theme-duration, 600ms) in the style's CSS to change only this style.
easingstringcubic-bezier(0.65, 0, 0.35, 1)Easing on the provider. Overrides this style's easing. Edit var(--tk-theme-easing, cubic-bezier(0.65, 0, 0.35, 1)) in the style's CSS to change only this style.
origin{ clientX: number; clientY: number } | Element-This style is anchored to the viewport and ignores origin.