@the_disreputable_doggo/theme-toggle
v1.0.2
Published
Theme Toggle component for Astro
Downloads
450
Readme
@the_disreputable_doggo/theme-toggle
An Astro component that provides a dark/light mode toggle button with smooth CSS animations.
Installation
npm install @the_disreputable_doggo/theme-toggleUsage
---
import ThemeToggle from '@the_disreputable_doggo/theme-toggle';
---
<ThemeToggle enabled={true} defaultMode="light" />Features
- Accessible toggle button with SVG icons.
- Remembers user preference in
localStorage. - Syncs automatically with the HTML
data-themeattribute.
