ThemeSwitch

The ThemeSwitch component allows users to toggle between light and dark themes in your Astro project.

Import

To use the ThemeSwitch component, first import it into your project:

---
import { ThemeSwitch } from 'free-astro-components'
---

Usage

Here's how you can use the textarea component in your Astro project:

Basic Usage

To create a basic textarea field, use the following code:

Props

label string The text label associated with the theme switch. -
class string CSS class for custom styling. -

Accessibility

  • Keyboard Accessibility: Ensure the ThemeSwitch component can be toggled using keyboard interactions (e.g., Enter key).