Components
- Accordion
- Add to Cart
- Animated List
- Carousel
- Collapsible Sidebarnew
- Dynamic Island
- Expandable Cardnew
- Expanding Searchnew
- Filter Grid
- Kanban Board
- Layout Switcher
- Morphing Popover
- Number Flip
- Page Transition
- Product Gallery
- Segmented Control
- Sortable Table
- Stack Navigator
- Status Button
- Step Wizard
- Tabs
- Text Morphnew
- Theme Mode Switch
- Theme Morph Button
- Theme Toggle Button
- Theme Toggle Switch
- Theme Transition
- Toast Stacknew
Installation
$ pnpm dlx shadcn@latest add @transition-kit/theme/ripple-revealUsage
<ThemeTransitionProvider transition="ripple-reveal">
{children}
</ThemeTransitionProvider>const { toggleTheme } = useThemeTransition();
<button
type="button"
onClick={(event) =>
toggleTheme({ transition: "ripple-reveal", origin: event })
}
>
Toggle theme
</button>;API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
transition | string | The provider's transition | "ripple-reveal" for this style: on the provider for every change, or per change with setTheme / toggleTheme. |
duration | number | 1100 | Milliseconds on the provider. Overrides this style's 1100ms timing. Edit var(--tk-theme-duration, 1100ms) in the style's CSS to change only this style. |
easing | string | ease-in-out | Easing 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 } | Element | The viewport centre | Pass the click event to start at the pointer, or an element to start at its centre. |