Alert

Inline message for notices and warnings with semantic colors, variants, a title, a description, action slots, and a dismiss control.

import { Alert } from "@plexui/vue/components/Alert";

Examples

Overview

Colors & variants

variant

Title

Description

Actions

Action placement

Indicator

Dismissible

API

PropTypeDefaultDescription
titlestring | slot—Title displayed in the alert
descriptionstring | slot—Description text
actionsslot—Actions (for example buttons)
actions-placement"end" | "bottom"—Placement of actions; automatic from sizing when unset
actions-class-namestring—Class applied to the actions container
colorSemanticColors"primary"Color scheme
variant"solid" | "soft" | "outline""outline"Style variant
indicatorslot | false—Custom indicator (slot), or :indicator="false" to hide it
@dismiss() => void—Shows the dismiss button when set
bannerbooleanfalseFull-width strip: square corners, lines above and below only

Styling

Alert reads these component tokens. Override them at any scope to restyle it:

  • --alert-border-radius: border radius (default var(--radius-xl))
  • --alert-font-size: font size (default var(--font-text-sm-size))
  • --alert-gap: gap (default spacing(3))
  • --alert-gutter: gutter (default spacing(4))
  • --alert-line-height: line height (default var(--font-text-sm-line-height))
  • --alert-title-font-weight: title font weight (default var(--font-weight-semibold))