alert

Alert

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

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 />
  <AlertAction />
</Alert>

Styling

All of Alert’s styles live in alert.json. New to styling in Frontic UI? How styling works →

Install

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

API reference

Alert.vue

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

Props 3

PropTypeDefault
classClassValue—
variantAlertVariant'neutral'
iconbooleantrue

Slots 1

SlotSlot props
icon—

Data attributes 1

Data attributeValues
data-variant'neutral' | 'info' | 'success' | 'warning' | 'error'

Recipe alert 5 groups

AlertAction.vue

AlertDescription.vue

AlertTitle.vue
Alert