<div align="center">
# ๐จ Theme
[](https://crates.io/crates/theme)
[](https://crates.io/crates/theme)

[](https://www.rust-lang.org/)
[](https://www.rust-lang.org)
[](https://github.com/wiseaidev)
[](https://discord.gg/b5JbvHW5nv)

</div>
## ๐ฌ Demo
| Yew | [](https://theme-rs.netlify.app) |
| Dioxus | [](https://theme-dio.netlify.app) |
| Leptos | TODO |
## ๐ Intro
**Theme** is a **flexible**, **declarative**, and **type-safe** theming system for Rust-based WASM frameworks like **Yew**, **Leptos**, and **Dioxus**. It provides structured and composable themes, including support for dark/light/system themes and custom color palettes with runtime composition and validation.
## ๐ค Why Use Theme?
1. **๐ Light, Dark, and System Themes**: Built-in support for light, dark, and system-preferred themes.
1. **๐จ Custom Themes with Composition**: Define your own themes with optional inheritance from base themes.
1. **๐งช Type-Safe Color Tokens**: Validate hex codes at runtime.
1. **๐ฆ Persistent Theme Selection**: Persist user-selected themes using `LocalStorage` or `SessionStorage`.
1. **โป๏ธ Runtime Composition with Inheritance**: Inherit and override from base themes dynamically at runtime.
1. **๐๏ธ Tailwind & DaisyUI Compatible**: Use custom themes to generate CSS variables that integrate smoothly with **Tailwind CSS** and **DaisyUI**.
## Yew Usage
Refer to [our guide](https://github.com/opensass/theme/blob/main/YEW.md) to integrate this component into your Yew app.
## ๐งฌ Dioxus Usage
Refer to [our guide](https://github.com/opensass/theme/blob/main/DIOXUS.md) to integrate this component into your Dioxus app.
## ๐ฑ Leptos Usage (TODO)
Refer to [our guide](https://github.com/opensass/theme/blob/main/LEPTOS.md) to integrate this component into your Leptos app.
## ๐ค Contributions
Contributions are welcome! Whether it's bug fixes, feature requests, or examples, we would love your help to make Theme better.
1. Fork the repository.
1. Create a new branch for your feature/bugfix.
1. Submit a pull request for review.
## ๐ License
Theme is licensed under the [MIT License](LICENSE). You are free to use, modify, and distribute this library in your projects.