theme 0.0.1

๐ŸŽจ A highly customizable theming system for WASM frameworks like Yew, Dioxus, and Leptos.
Documentation
<div align="center">

# ๐ŸŽจ Theme

[![Crates.io](https://img.shields.io/crates/v/theme)](https://crates.io/crates/theme)
[![Crates.io Downloads](https://img.shields.io/crates/d/theme)](https://crates.io/crates/theme)
![Crates.io License](https://img.shields.io/crates/l/theme)
[![made-with-rust](https://img.shields.io/badge/Made%20with-Rust-1f425f.svg?logo=rust&logoColor=white)](https://www.rust-lang.org/)
[![Rust](https://img.shields.io/badge/Rust-1.85%2B-blue.svg)](https://www.rust-lang.org)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/wiseaidev)

[![Join our Discord](https://dcbadge.limes.pink/api/server/b5JbvHW5nv)](https://discord.gg/b5JbvHW5nv)

<!-- absolute url for docs.rs cause assets is excluded from crate -->
![logo](https://raw.githubusercontent.com/opensass/theme/refs/heads/main/assets/logo.webp)

</div>

## ๐ŸŽฌ Demo

| Framework | Live Demo |
| --- | --- |
| Yew | [![Netlify Status]https://api.netlify.com/api/v1/badges/a0efc7e9-f20e-4dd9-93e1-c8f4fde7506f/deploy-status]https://theme-rs.netlify.app |
| Dioxus | TODO |
| 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

<!-- absolute url for docs.rs cause YEW.md is not included in crate -->
Refer to [our guide](https://github.com/opensass/theme/blob/main/YEW.md) to integrate this component into your Yew app.

## ๐Ÿงฌ Dioxus Usage (TODO)

<!-- absolute url for docs.rs cause DIOXUS.md is not included in crate -->
Refer to [our guide](https://github.com/opensass/theme/blob/main/DIOXUS.md) to integrate this component into your Dioxus app.

## ๐ŸŒฑ Leptos Usage (TODO)

<!-- absolute url for docs.rs cause LEPTOS.md is not included in crate -->
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.