Component

Alert

Alerts surface system-level feedback tied to the current page or action — form results, status messages, and contextual notices. Six semantic variants, each wired to the --components-alerts-* tokens, render across both Desktop/Tablet and Mobile Application layouts.

Storybook
Playground
Variant
Title
Supporting text
Description
Action
Action label
Leading icon
Close icon
Preview

We’ve just released a new feature

Exciting news! We've just launched 'Starlight', a cutting-edge feature designed to elevate your experience. Dive into enhanced collaboration, streamlined workflows, and personalized insights. Explore the future of productivity with 'Starlight.'

Learn More

JSX
<Alert
  variant="primary"
  title="We’ve just released a new feature"
  content="Exciting news! We've just launched 'Starlight', a cutting-edge feature designed to elevate your experience. Dive into enhanced collaboration, streamlined workflows, and personalized insights. Explore the future of productivity with 'Starlight.'"
  showLeftIcon
  showRightIcon
  showActionButton
  actionLabel="View Changes"
/>

Props

The full AlertProps API. Props marked Required have no default.

PropTypeDefaultDescription
variant
'primary' | 'error' | 'warning' | 'success' | 'information' | 'neutral''primary'Alert type — controls the color tokens and the default leading icon.
titleRequired
stringHeading text. Truncates to a single line. Never render content-only.
content
stringSupporting context text below the title. Truncates to 2 lines.
platform
'desktop' | 'mobile''desktop'Layout context. Both platforms render a text action row; 'mobile' uses tighter padding and smaller icons.
showLeftIcon
booleantrueShow the leading status icon (decorative).
showRightIcon
booleantrueShow the trailing dismiss (close) control.
showActionButton
booleantrueShow the action area below the text.
actionLabel
string'View Changes'Trailing text CTA with a forward arrow. Desktop pairs it with a fixed "Learn More" label; mobile pairs it with dismissLabel.
dismissLabel
string'Dismiss'Mobile action — leading dismiss text label. Ignored on desktop.
onAction
() => voidCalled when the mobile action CTA (actionLabel) is activated.
onDismiss
() => voidCalled when the dismiss control (right icon, or mobile dismiss label) is activated.
className
stringLayout-only classes (margin, width, positioning).