dioxus_ui 0.1.1

Build modular UI components in just 1 line. Tailored for the Dioxus framework.
Documentation
  • Coverage
  • 50%
    2 out of 4 items documented1 out of 1 items with examples
  • Size
  • Source code size: 52.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.94 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 5s Average build duration of successful builds.
  • all releases: 1m 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • max-wells

Dioxus UI

A utility crate for creating UI components in Dioxus with Tailwind CSS class merging support. Built on tw_merge.

Features

  • clx! macro for creating components with merged Tailwind classes

Usage

Basic Component with clx!

// 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 🧡" }
    }
}

Installation

Add this to your Cargo.toml:

[dependencies]
dioxus_ui = "0.1"

License

MIT