ComponentsEnterpriseAlert

Alert / Banner

Alert communicates persistent contextual information, success, warning, or failure.

5 tones3 variants3 sizesInline + blockActions + dismissal

Overview

Use Alert for important information that should remain near the affected content until people act, dismiss it, or the underlying condition changes.

Expiring credential

Live preview

The warning remains visible and offers a relevant recovery action.

Certificate expires in 8 days
Rotate the certificate to avoid service interruption.
CertificateAlert.tsx
tsx
import { Alert, Button } from 'omverse-ui'
 
<Alert
tone="warning"
title="Certificate expires in 8 days"
action={<Button variant="text" size="sm">Rotate certificate</Button>}
dismissible
onDismiss={() => setVisible(false)}
>
Rotate the certificate to avoid service interruption.
</Alert>

Anatomy

A complete alert combines semantic status, a concise summary, useful detail, an optional action, and optional dismissal.

!Certificate expires soonRotate it to avoid interruption.Rotate×12345
  1. 1
    Status icon

    Reinforces tone without carrying meaning alone.

  2. 2
    Title

    Summarizes the condition in a scannable phrase.

  3. 3
    Description

    Explains impact or the most useful next step.

  4. 4
    Action

    Offers one contextual response when needed.

  5. 5
    Dismiss

    Removes non-critical, recoverable information.

When to use

Use Alert when a condition affects the current page, task, or region and must remain discoverable.

Recommended

  • Explain page-level conditions

    Communicate maintenance, policy, availability, or configuration states.

  • Keep recovery in context

    Place the alert close to affected content and offer one direct action.

  • Confirm durable outcomes

    Show success when confirmation must remain visible after a transient toast would disappear.

When not to use

Choose a different feedback pattern when information is transient, blocking, field-specific, or merely decorative.

Avoid

  • Do not replace validation

    Place field errors beside the relevant input.

  • Do not interrupt with a banner

    Use Dialog only when immediate confirmation or input is required.

  • Do not duplicate transient feedback

    Use Toast for brief operation results that need no persistent action.

Variants

Tone communicates meaning while treatment and layout control emphasis and density.

Tonal

Default container for contextual persistent feedback.

Outlined

Lower-fill treatment for visually dense pages.

Filled

Highest emphasis for rare, important conditions.

Inline or block

Adapts compact statements and richer guidance.

States

Alert tone reflects the meaning of the condition rather than workflow progress alone.

StateTriggerVisual responseInteraction
NeutralGeneral contextual noteSurface treatmentOptional action
InformationRelevant non-critical updatePrimary tonal treatmentOptional details
SuccessDurable positive outcomeSuccess treatmentContinue or inspect
WarningRisk requires attentionWarning treatmentPrevent or resolve
ErrorFailure requires awarenessError treatment and alert roleRecover or get help

Behavior

Alert owns semantic presentation; applications own visibility, timing, recovery, persistence, and telemetry.

Announcement

Error defaults to alert; other tones default to polite status.

Controlled dismissal

Dismiss invokes a callback and leaves visibility to the parent.

Action focus

Actions and close controls retain native keyboard behavior.

Responsive flow

Content and controls reflow without truncating the message.

Accessibility

Every alert must remain understandable without color, iconography, or visual position.

  • Use alert only for urgent, dynamically introduced failures; use status for other updates.
  • Include the condition in visible text instead of relying on the status icon.
  • Do not move focus to an alert unless the workflow genuinely requires immediate attention.
  • Give dismissal a specific accessible label when several alerts are present.
  • Keep action labels explicit and unique in context.
  • Do not automatically dismiss content before people can read or operate it.

Content guidelines

State the condition first, explain impact briefly, and offer a specific next step only when one exists.

Lead with the condition

Use a factual, concise title.

ExampleCertificate expires in 8 days

Explain impact

Say what happens if the condition continues.

ExampleService connections may stop.

Name the response

Use an action-and-object label.

ExampleRotate certificate

Avoid alarmism

Match urgency to actual consequence.

ExampleDeployment blocked

Examples

Inline layout supports concise confirmation while retaining the same semantic structure.

Inline success

Live preview
Policy published
The policy now applies to every workspace member.
PublishedAlert.tsx
tsx
<Alert tone="success" layout="inline" title="Policy published">
The policy now applies to every workspace member.
</Alert>

Props / API

Alert extends div attributes and composes application-owned actions.

Props

PropTypeDefaultDescription
titleReactNodeundefinedShort summary of the condition.
childrenReactNodeundefinedSupporting guidance or condition detail.
tone'neutral' | 'info' | 'success' | 'warning' | 'error''info'Sets semantic emphasis, icon, color, and default announcement role.
variant'tonal' | 'outlined' | 'filled''tonal'Controls visual emphasis.
size'sm' | 'md' | 'lg''md'Controls spacing and icon scale.
layout'inline' | 'block''block'Arranges compact or descriptive alert content.
iconIconName | nulltone iconOverrides or removes the semantic visual.
actionReactNodeundefinedContextual action such as a Button or Link.
dismissiblebooleanfalseShows a close control.
onDismiss() => voidundefinedRuns when the close control is activated.
dismissLabelstring'Dismiss alert'Accessible label for the close control.