theme-controller-v1
v1.0.4
Published
A simple React component for toggling between light and dark themes.
Downloads
45
Readme
React Theme Toggler
Welcome to the React Theme Toggler! 🌙☀️
This is a simple and customizable theme switcher component for React applications. It allows users to toggle between light and dark themes, enhancing the user experience and making your app more visually appealing.
Installation
To use the React Theme Switcher in your project, install it via npm:
npm install theme-controller-v1
Customization
The ThemeSwitcher
component is fully customizable. You can change the icon size, colors, and animation speed to fit your app's design.
Props
You can customize the ThemeSwitcher
component using the following props:
| Prop | Type | Default Value | Description |
|------------------|------------|----------------------|-----------------------------------------------------|
| iconSize
| string
| "2rem"
| Size of the icons displayed (sun and moon). |
| sunColor
| string
| "#ffcc00"
| Color of the sun icon. |
| moonColor
| string
| "#4d4dff"
| Color of the moon icon. |
| animationSpeed
| string
| "0.6s"
| Speed of the icon animation during the theme switch. |