Booting Environment...

Animated Theme Toggler

A theme toggle button that transitions between light and dark modes with a fluid, circular reveal animation using the View Transitions API.

Installation

npx raya-ui@latest add animated-theme-toggler

File Structure

your-project
components
ui
animated-theme-toggler
AnimatedThemeToggler.vue

API Reference

Props

theme
string
"dark"

The current active theme mode of the application.

duration
number
400

The duration of the circular clip-path reveal animation in milliseconds.

Emits

update:modelValue
boolean

Fired when the user interacts with the toggle. Emits true if switching to dark mode.

Click to transition the app theme
Settings
400ms