| Crates.io | dioxus_ui |
| lib.rs | dioxus_ui |
| version | 0.1.1 |
| created_at | 2025-03-03 21:28:57.316907+00 |
| updated_at | 2025-03-15 15:56:54.226121+00 |
| description | Build modular UI components in just 1 line. Tailored for the Dioxus framework. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1576358 |
| size | 53,072 |
A utility crate for creating UI components in Dioxus with Tailwind CSS class merging support. Built on tw_merge.
clx! macro for creating components with merged Tailwind classesclx!// components/ui/card.rs
use dioxus::prelude::*;
use dioxus_ui::clx;
mod components {
use super::*;
clx! {Card, div, "rounded-lg p-4", "bg-sky-500"} // 🩵
}
pub use components::*;
// components/demos/demo_card.rs
#[component]
pub fn DemoCard() -> Element {
rsx! {
Card { "Card bg-sky-500 🩵" }
Card { class: "bg-orange-500", "Card bg-orange-500 🧡" }
}
}
Add this to your Cargo.toml:
[dependencies]
dioxus_ui = "0.1"
MIT