alert

Alert

A short message in neutral, info, success, warning or error, with an optional icon, title, description and an action such as dismiss.

States: Default

Parts

PartFileDoes
AlertAlert.vueShows a short message to the shopper, with an optional icon, title and description.
AlertActionAlertAction.vueHolds a button or link that lets the user act on or dismiss the alert.
AlertDescriptionAlertDescription.vueShows the detail text of the alert below its title.
AlertTitleAlertTitle.vueShows the headline of the alert.

Anatomy

<Alert>
  <AlertTitle />
  <AlertDescription />
</Alert>

Styling

PartRecipe
Alertalert
AlertDescriptionalert-description
AlertTitlealert-title

Install

Writes 6 files into components/ui/alert/. For agents, npx @frontic/ui docs alert prints this reference as markdown; the MCP server serves the same.

npm packages
@lucide/vue
class-variance-authority
reka-ui

API reference

Alert Alert.vue

Shows a short message to the shopper, with an optional icon, title and description. Renders a <div>.

PropTypeDefault
classClassValue—
variantAlertVariant'neutral'
iconbooleantrue
SlotSlot props
icon—
Data attributeValues
data-variant'neutral' | 'info' | 'success' | 'warning' | 'error'
Recipe alertSets
base: alert 16 properties
variant: info 3 properties · 2 inherited
variant: success 3 properties · 2 inherited
variant: warning 3 properties · 2 inherited
variant: error 3 properties · 2 inherited

AlertAction AlertAction.vue

AlertDescription AlertDescription.vue

AlertTitle AlertTitle.vue

Example