Alert

Displays a callout for user attention.

Success! Your changes have been saved

This is an alert with icon, title and description.

Destructive

Alerts have a destructive themed variant.

Something went wrong!

Your session has expired. Please log in again.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::alert::*;

#[component]
pub fn AlertAnatomy() -> impl IntoView {
    view! {
        <Alert>
            <AlertTitle />
            <AlertDescription />
        </Alert>
    }
}

API Reference

Alert

Contains the contents of the alert.

Custom Attributes
NameTypeDefaultDescription
variantString"alert"

Specifies the style of alert to display.

Implements global attributes.

AlertDescription

Contains the description of the alert.

Implements global attributes.

AlertTitle

Contains the title of the alert.

Implements global attributes.