Non-dismissible status message surface with optional title and icon slots.
Install @wyrd-company/react or the Flutter package and use it directly —
your DESIGN.md does the styling.
catalog/contracts/alert.ymlsource of truth · verbatim
$schema: https://thewyrdingway.dev/schemas/component-contract.schema.ymlcontractVersion: 0.1.0identity:name: Alerttag: wyrd-alertpackage: wyrd.component.alerttitle: Alertsummary: Non-dismissible status message surface with optional title and icon slots.relationships:related-to: - quality-parity-and-gatesclassification:category: feedbackcomposition: multi-slotinteractive: falsetarget-strategy:react: requiredflutter: requiredsurface:properties: - name: varianttype:kind: enumvalues: - info - success - warning - dangerrequired: falsedefault: inforeflects: trueserializable: truesummary: Visual status tone.slots: - name: contentcontent: truerequired: truecardinality: exactly-oneaccepts: - text - nodesummary: Primary alert message content. - name: titlerequired: falsecardinality: zero-or-oneaccepts: - text - nodesummary: Optional short heading for the alert. - name: iconrequired: falsecardinality: zero-or-oneaccepts: - iconsummary: Optional decorative status icon.events: []states: - name: defaultsource: platformsummary: Informational status alert.parts: - name: rootsummary: Status live-region root.slots: - content - title - icon - name: iconsummary: Optional icon slot container.slots: - icon - name: bodysummary: Alert text column.slots: - title - contenttokens:info:background: color.secondaryforeground: color.on-secondaryborder-color: color.primarysuccess:background: color.success-containerforeground: color.on-success-containerborder-color: color.successwarning:background: color.warning-containerforeground: color.on-warning-containerborder-color: color.warningdanger:background: color.error-containerforeground: color.on-error-containerborder-color: color.errorradius: rounded.mdpadding-x: spacing.mdpadding-y: spacing.smgap: spacing.smborder-width: 1pxtitle: typography.label-mdcontent: typography.body-mdmessages: []obligations:accessibility:role: statusname: Alert content provides the announced status text.keyboard: []semantics: - Web projections expose role=status as a polite live region. - Urgent or interruptive alerts are the host application's responsibility to escalate. - The optional icon is decorative unless the host supplies semantic content inside it.behavior:model: statelessinteractions: []hostEffects: []conditions: - rtl - reduced-motion - cvd-deuteranopia - density-compact - text-expansionsdui:status: serializableserializableProperties: - variantserializableSlots: - content - title - iconeventBindings: []notes: Alert serializes its variant and slotted content; hosts choose whether a status should be escalated beyond polite status semantics.examples: - name: infostate: defaultproperties:variant: infoslots:title: Scheduled maintenancecontent: The component registry will be read-only from 02:00 to 02:30 UTC. - name: successstate: defaultproperties:variant: successslots:title: Settings savedcontent: Your design-system preferences are ready for the next generation run. - name: warningstate: defaultproperties:variant: warningslots:title: Unsaved changescontent: Save or discard your token edits before switching brands. - name: dangerstate: defaultproperties:variant: dangerslots:title: Deployment failedcontent: Resolve the contract drift before publishing this release.overrides:react:slots:content: childrenflutter:slots:content: child
01
Examples
Generated from the contract's examples block.
Previews are the published @wyrd-company/react component, themed by the
brand's role tokens — flip the site's light/dark toggle and they follow.
infostate: default
Scheduled maintenance
The component registry will be read-only from 02:00 to 02:30 UTC.
Usage
import { WyrdAlert } from"@wyrd-company/react";
<WyrdAlert variant="info" title="Scheduled maintenance">
The component registry will be read-only from 02:00 to 02:30 UTC.
</WyrdAlert>
import'package:wyrd_flutter/wyrd_flutter.dart';
WyrdAlert(
variant: 'info',
title: Text('Scheduled maintenance'),
child: Text('The component registry will be read-only from 02:00 to 02:30 UTC.'),
)
successstate: default
Settings saved
Your design-system preferences are ready for the next generation run.
Usage
import { WyrdAlert } from"@wyrd-company/react";
<WyrdAlert variant="success" title="Settings saved">
Your design-system preferences are ready for the next generation run.
</WyrdAlert>
import'package:wyrd_flutter/wyrd_flutter.dart';
WyrdAlert(
variant: 'success',
title: Text('Settings saved'),
child: Text('Your design-system preferences are ready for the next generation run.'),
)
warningstate: default
Unsaved changes
Save or discard your token edits before switching brands.
Usage
import { WyrdAlert } from"@wyrd-company/react";
<WyrdAlert variant="warning" title="Unsaved changes">
Save or discard your token edits before switching brands.
</WyrdAlert>
import'package:wyrd_flutter/wyrd_flutter.dart';
WyrdAlert(
variant: 'warning',
title: Text('Unsaved changes'),
child: Text('Save or discard your token edits before switching brands.'),
)
dangerstate: default
Deployment failed
Resolve the contract drift before publishing this release.
Usage
import { WyrdAlert } from"@wyrd-company/react";
<WyrdAlert variant="danger" title="Deployment failed">
Resolve the contract drift before publishing this release.
</WyrdAlert>
import'package:wyrd_flutter/wyrd_flutter.dart';
WyrdAlert(
variant: 'danger',
title: Text('Deployment failed'),
child: Text('Resolve the contract drift before publishing this release.'),
)
02
Properties
Name
Type
Default
Summary
variant
info | success | warning | danger
info
Visual status tone.
03
Slots & events
Slot
Cardinality
Accepts
Summary
content
exactly-one
text, node
Primary alert message content.
title
zero-or-one
text, node
Optional short heading for the alert.
icon
zero-or-one
icon
Optional decorative status icon.
04
Tokens
The contract's token bindings. Open the shared contextual sidebar from any example;
primary swatches reflect the color you pick there. Error swatches show the active
preset's values; editing any knob switches to custom and resets error to TWW · Ink.
Binding
Token
info.background
color.secondary
info.foreground
color.on-secondary
info.border-color
color.primary
success.background
color.success-container
success.foreground
color.on-success-container
success.border-color
color.success
warning.background
color.warning-container
warning.foreground
color.on-warning-container
warning.border-color
color.warning
danger.background
color.error-container
danger.foreground
color.on-error-container
danger.border-color
color.error
radius
rounded.md
padding-x
spacing.md
padding-y
spacing.sm
gap
spacing.sm
border-width
1px
title
typography.label-md
content
typography.body-md
05
States
State
Source
Summary
default
platform
Informational status alert.
06
Accessibility
From the contract's accessibility obligations. Role status; Alert content provides the announced status text.
Web projections expose role=status as a polite live region.
Urgent or interruptive alerts are the host application's responsibility to escalate.
The optional icon is decorative unless the host supplies semantic content inside it.
Status: serializable. Alert serializes its variant and slotted content; hosts choose whether a status should be escalated beyond polite status semantics.