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

Icon

With Icon

Loading

See Also