ShadcnUI.Components.Foundation.Alert (shadcn_ui v1.0.0)

Copy Markdown View Source

Visible feedback with explicit, caller-selected announcement semantics.

Alert renders only the current presentation. The caller owns insertion timing, lifecycle, dismissal, retry behavior, action handling, and command outcomes. A destructive visual variant never implies urgency.

Summary

Functions

Renders visible feedback without owning its lifecycle or actions.

Functions

alert(assigns)

Renders visible feedback without owning its lifecycle or actions.

At least one nonblank title or description is required. Icon and actions slots are trusted HEEX; callers retain the native meaning and behavior of any nested controls.

Attributes

  • variant (:atom) - Defaults to :default. Must be one of :default, or :destructive.
  • announcement (:atom) - Defaults to :none. Must be one of :none, :polite, or :assertive.
  • title (:string) - Defaults to nil.
  • description (:string) - Defaults to nil.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • icon
  • actions