Introduction
Rust shadcn/ui is a Rust port of shadcn/ui.
TODO: introduction text
Frameworks
Rust shadcn/ui is available for the following frameworks:
The following frameworks are under consideration:
The tables below show the support for the various frameworks.
- ✅ = Supported
- 🟦 = Early Support
- 🚧 = Work In Progress
- ❌ = Unsupported
Primitives Support
Name | Dioxus | Leptos | Yew |
---|---|---|---|
Accordion | ❌ | ❌ | ❌ |
Alert | ❌ | 🟦 | ❌ |
Alert Dialog | ❌ | ❌ | ❌ |
Aspect Ratio | ❌ | ❌ | ❌ |
Avatar | ❌ | ❌ | ❌ |
Badge | ❌ | ❌ | ❌ |
Breadcrumb | ❌ | ❌ | ❌ |
Button | ❌ | 🟦 | ❌ |
Calendar | ❌ | ❌ | ❌ |
Card | ❌ | 🟦 | ❌ |
Carousel | ❌ | ❌ | ❌ |
Chart | ❌ | ❌ | ❌ |
Checkbox | ❌ | ❌ | ❌ |
Collapsible | ❌ | ❌ | ❌ |
Combobox | ❌ | ❌ | ❌ |
Command | ❌ | ❌ | ❌ |
Context Menu | ❌ | ❌ | ❌ |
Data Table | ❌ | ❌ | ❌ |
Date Picker | ❌ | ❌ | ❌ |
Dialog | ❌ | ❌ | ❌ |
Drawer | ❌ | ❌ | ❌ |
Dropdown Menu | ❌ | ❌ | ❌ |
Form | ❌ | ❌ | ❌ |
Hover Card | ❌ | ❌ | ❌ |
Input | ❌ | 🟦 | ❌ |
Input OTP | ❌ | ❌ | ❌ |
Label | ❌ | ❌ | ❌ |
Menubar | ❌ | ❌ | ❌ |
Navigation Menu | ❌ | ❌ | ❌ |
Pagination | ❌ | ❌ | ❌ |
Popover | ❌ | ❌ | ❌ |
Progress | ❌ | ❌ | ❌ |
Radio Group | ❌ | ❌ | ❌ |
Resizable | ❌ | ❌ | ❌ |
Scroll Area | ❌ | ❌ | ❌ |
Select | ❌ | ❌ | ❌ |
Separator | ❌ | ❌ | ❌ |
Sheet | ❌ | ❌ | ❌ |
Skeleton | ❌ | ❌ | ❌ |
Slider | ❌ | ❌ | ❌ |
Sonner | ❌ | ❌ | ❌ |
Switch | ❌ | ❌ | ❌ |
Table | ❌ | ❌ | ❌ |
Tabs | ❌ | ❌ | ❌ |
Textarea | ❌ | 🟦 | ❌ |
Toast | ❌ | ❌ | ❌ |
Toggle | ❌ | ❌ | ❌ |
Toggle Group | ❌ | ❌ | ❌ |
Tooltip | ❌ | ❌ | ❌ |
License
This project is available under the MIT license.
Rust For Web
The Rust shadcn/ui project is part of the Rust For Web.
Rust For Web creates and ports web UI libraries for Rust. All projects are free and open source.
Components
Alert
Displays a callout for user attention.
Installation
The CLI is not yet available. For now, manually copy the component source into your project.
rust-shadcn-ui add alert
Usage
use leptos::*;
use crate::components::ui::alert::{Alert, AlertDescription, AlertTitle};
#[component]
fn Usage() -> impl IntoView {
view! {
<Alert>
// <Terminal class="h-4 w-4" />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the cli.
</AlertDescription>
</Alert>
}
}
Examples
Default
Destructive
See Also
Button
Displays a button or a component that looks like a button.
Installation
The CLI is not yet available. For now, manually copy the component source into your project.
rust-shadcn-ui add button
Usage
use leptos::*;
use crate::components::ui::button::{Button, ButtonVariant};
#[component]
fn Usage() -> impl IntoView {
view! {
<Button variant=ButtonVariant::Outline>Button>/Button>
}
}
Examples
Primary
Secondary
Destructive
Outline
Ghost
Link
Icon
With Icon
Loading
See Also
Card
Displays a card with header, content, and footer.
TODO
See Also
Input
Displays a form input field or a component that looks like an input field.
TODO
See Also
Textarea
Displays a form textarea or a component that looks like a textarea.
TODO