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 yew::prelude::*;

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 and dependencies to your app using the cli."}
            </AlertDescription>
        </Alert>
    }
}

Examples

Default

Destructive

See Also