#themes #yew #dioxus #leptos

theme

๐ŸŽจ A highly customizable theming system for WASM frameworks like Yew, Dioxus, and Leptos

3 releases

Uses new Rust 2024

0.0.3 May 10, 2025
0.0.2 May 10, 2025
0.0.1 May 9, 2025

#540 in Science

50 downloads per month

MIT license

41KB
725 lines

๐ŸŽจ Theme

Crates.io Crates.io Downloads Crates.io License made-with-rust Rust Maintenance

Join our Discord

logo

๐ŸŽฌ Demo

Framework Live Demo
Yew Netlify Status
Dioxus Netlify Status
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.

  2. ๐ŸŽจ Custom Themes with Composition: Define your own themes with optional inheritance from base themes.

  3. ๐Ÿงช Type-Safe Color Tokens: Validate hex codes at runtime.

  4. ๐Ÿ“ฆ Persistent Theme Selection: Persist user-selected themes using LocalStorage or SessionStorage.

  5. โ™ป๏ธ Runtime Composition with Inheritance: Inherit and override from base themes dynamically at runtime.

  6. ๐ŸŽ›๏ธ Tailwind & DaisyUI Compatible: Use custom themes to generate CSS variables that integrate smoothly with Tailwind CSS and DaisyUI.

Yew Usage

Refer to our guide to integrate this component into your Yew app.

๐Ÿงฌ Dioxus Usage

Refer to our guide to integrate this component into your Dioxus app.

๐ŸŒฑ Leptos Usage (TODO)

Refer to our guide 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.
  2. Create a new branch for your feature/bugfix.
  3. Submit a pull request for review.

๐Ÿ“œ License

Theme is licensed under the MIT License. You are free to use, modify, and distribute this library in your projects.

Dependencies

~7โ€“21MB
~296K SLoC