Alert
Contextual feedback messages. Built from two Figma components: the Alert states (Primary, Success, Warning, Danger) and the Alerts List (stacked container). All values pulled directly from the LUSTER Figma variables.
State: Primary
Background: #F2EDFF
Border: #C5B2FF
Icon / Title: #794DFF
Padding: 20px · Gap: 16px · Border: 2px
Component · Alert States
Four semantic variants. Each maps to a palette family for background, border, icon and title color. Warning uses a dashed border.
Component · Alerts List
A titled container that stacks multiple alerts with a 12px gap (alert/list/gap) — exactly as composed in Figma.
Design Tokens
These tokens reflect the Alerts List component (Figma: Alert list) — the titled section container, the stacked list, and the alert items it holds. The list stacks alerts with --alertListGap (12px), distinct from each alert's internal --alertGap (16px).
| Token Name | Figma Variable | Default Value |
|---|---|---|
| --alertListContent | Alert list/list/content | "Alerts" |
| --alertListGap | alert/list/gap | 12px |
| --foregroundOnSurface | foreground/on surface (list title) | #24242C |
| --titleFontSize | Typography/Title/Font/Size | 16px |
| --titleFontLineHeight | Typography/Title/Font/LineHeight | 19px |
| --titleFontWeight | Typography/Title/Font/Weight | 700 |
| --sectionBgColor | section/bg/color | #FFFFFF |
| --sectionPaddingX | section/padding/x | 24px |
| --sectionPaddingY | section/padding/y | 24px |
| --sectionBorderRadius | section/border/radius | 0px |
| --sectionMarginBottom | section/margin-bottom | 24px |
| --sectionShadowColor | section/shadow/color | #CECBDC |
| --sectionShadowOffsetX | section/shadow/offset-x | 0px |
| --sectionShadowOffsetY | section/shadow/offset-y | 0px |
| --sectionShadowBlur | section/shadow/blur | 0px |
| --alertGap | Alert/Gap | 16px |
| --alertPaddingX | Alert/Padding/X | 20px |
| --alertPaddingY | Alert/Padding/Y | 20px |
| --alertBorderRadius | Alert/Border/Radius | 0px |
| --alertBorderWidth | Alert/Border/Width | 2px |
| --alertPrimaryBgColor | Alert/Primary/Bg/Color | #F2EDFF |
| --alertPrimaryBorderColor | Alert/Primary/Border/Color | #C5B2FF |
| --alertPrimaryIconColor | Alert/Primary/Icon/Color | #794DFF |
| --alertPrimaryTitleFontColor | Alert/Primary/Title/Font/Color | #794DFF |
| --alertSuccessBgColor | Alert/Success/Bg/Color | #E6FAED |
| --alertSuccessBorderColor | Alert/Success/Border/Color | #91E8B2 |
| --alertSuccessIconColor | Alert/Success/Icon/Color | #00CA4B |
| --alertSuccessTitleFontColor | Alert/Success/Title/Font/Color | #00CA4B |
| --alertWarningBgColor | Alert/Warning/Bg/Color | #FDF7E6 |
| --alertWarningBorderColor | Alert/Warning/Border/Color | #F7DD91 |
| --alertWarningIconColor | Alert/Warning/Icon/Color | #EDB000 |
| --alertWarningTitleFontColor | Alert/Warning/Title/Font/Color | #EDB000 |
| --alertDangerBgColor | Alert/Danger/Bg/Color | #FEE9E9 |
| --alertDangerBorderColor | Alert/Danger/Border/Color | #FAA2A2 |
| --alertDangerIconColor | Alert/Danger/Icon/Color | #F32727 |
| --alertDangerTitleFontColor | Alert/Danger/Title/Font/Color | #F32727 |
| --caption2FontSize | Typography/Caption-2/Font/Size | 12px |
| --caption2FontLineHeight | Typography/Caption-2/Font/LineHeight | 14px |
| --caption2FontWeight | Typography/Caption-2/Font/Weight | 700 |
| --bodyFontFamily | Body/Font/Family | Inter |
Usage Guidelines
✓ DO
Match the state to intent: Success for confirmation, Danger for errors.
✓ DO
Keep alert copy short and actionable; lead with what happened.
✗ DON'T
Don't stack more than a few alerts — group them in an Alerts List.
✗ DON'T
Don't rely on color alone — always include the icon and text.
Implementation
Values shown are the Diamond brand, Light mode defaults (the Figma file's default mode). Other brands (Amber, Opal) and Dark mode resolve to different values via the Color Theme & Component Brand collections.
import './Alert.css';
import { InboxIcon } from './icons';
export interface AlertProps {
state?: 'primary' | 'success' | 'warning' | 'danger';
icon?: React.ReactNode;
children: React.ReactNode;
}
export const Alert = ({ state = 'primary', icon, children }: AlertProps) => (
<div className={`alert alert--${state}`} role="alert">
<span className="alert__icon">{icon ?? <InboxIcon />}</span>
<span className="alert__title">{children}</span>
</div>
);
export const AlertsList = ({ title = 'Alerts', children }) => (
<div className="alerts-list">
<h3 className="alerts-list__title">{title}</h3>
{children}
</div>
);