Crates.io | leptos_ui |
lib.rs | leptos_ui |
version | |
source | src |
created_at | 2025-03-03 15:46:31.559677+00 |
updated_at | 2025-04-17 04:27:26.722492+00 |
description | Macros to build UI components easily with Leptos and Tailwind CSS. |
homepage | |
repository | |
max_upload_size | |
id | 1575777 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A utility crate for creating UI components in Leptos with Tailwind CSS class merging support. Built on top of tw_merge.
clx!
macro for creating components with merged Tailwind classes
a!
macro for creating anchor elements with merged Tailwind classes
div!
macro for creating components without children
input!
macro for creating input elements with merged Tailwind classes
transition!
macro for creating components with "view-transition-name:*"
clx!
// components/ui/card.rs
use leptos::prelude::*;
use leptos_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() -> impl IntoView {
view! {
<Card>"Card bg-sky-500 🩵"</Card>
<Card class="bg-orange-500">"Card bg-orange-500 🧡"</Card>
// └──> 🤯 NO CONFLICT CLASS!!
}
}
Add this to your Cargo.toml
:
[dependencies]
leptos_ui = "0.1"
PS: Dont forget to run regularly cargo update
(frequently updates) !
This project is licensed under the MIT License. See the LICENSE file for details.