Getting Started
Components
Special Effects
Animations
Text Animations
Backgrounds
An Animated theme toggler component, fully customizable using Tailwind CSS.
@lucide/svelte
Installation
pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/animated-theme-toggler.json
Install dependencies
Install the required packages for this component:
pnpm add @lucide/svelte
Copy the Source Code
Copy and paste the following code into your project:
animated-theme-toggler.svelte
index.ts
Add Tailwind CSS
Add the following to your routes/layout.css file:
src/routes/layout.css
Folder Structure
Folder Structure
Props
AnimatedThemeToggler
A component for smooth theme switching with circular reveal animation.
| Name | Type | Default | Description |
|---|---|---|---|
class | string | "" | Additional CSS classes to apply |
duration | number | 400 | Duration of the animation in milliseconds |