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