Toast#

Success
DefaultDelay
let toasts = expect_context::<Toasts>(); view! { <Button on_press=move |_| { toasts.push( Toast { id: Uuid::new_v4(), created_at: time::OffsetDateTime::now_utc(), variant: variant.get_untracked(), header: header.get_untracked().into_view(), body: body.get_untracked().into_view(), timeout: timeout.get_untracked(), } )}> "Create Toast" </Button> }

Styling#

You may overwrite any of the following CSS variables to meet your styling needs.

--toast-border-radius --toast-header-border-bottom --toast-header-padding --toast-message-padding --toast-info-header-background --toast-info-header-color --toast-info-message-background --toast-info-message-color --toast-success-header-background --toast-success-header-color --toast-success-message-background --toast-success-message-color --toast-warn-header-background --toast-warn-header-color --toast-warn-message-background --toast-warn-message-color --toast-error-header-background --toast-error-header-color --toast-error-message-background --toast-error-message-color