Alert

Alerts provide short, timely, and relevant information for your users. It can be a simple text message or customised HTML content with paragraphs, headings and links.

DesignUsageAccessibilityUpdates

Purpose

Timely information

Alerts surface messages that are relevant to what a user is currently doing — not after they've moved on.

Communicate severity

Contextual tones — info, success, warning, danger — tell users at a glance how urgently they need to act.

Stay in the flow

Inline alerts don't interrupt or redirect — they sit within the page so users stay oriented while being informed.

Anatomy

Maintenance starts at 10pm tonight.
1

Container

2

Leading icon (optional)

3

Title (optional)

4

Description

5

Dismissible - close button (optional)

Configuration

Variant

The alert offers variants to convey a different level of importance.

Review the latest guidance before submitting your application. Read the details
Review the latest guidance before submitting your application. Read the details

Use to provide general context or neutral information, such as announcements or guidance that don't indicate a status outcome, in either filled or outlined style.

Style

The alert supports two styles—filled and outlined.

Review the latest guidance before submitting your application. Read the details
Your application has been submitted successfully. View confirmation
We could not save your changes because the session expired. Sign in again
Some required documents are missing from your application. Check requirements
This service will save your progress automatically while you complete the form. Learn more

Use filled alerts when the message needs stronger visual emphasis, such as higher-priority updates or messages users should notice immediately.

Dismissible

The alert can be manually dismissed by the user.

This notice remains visible because it affects how users complete the current task. Read notice

Use for persistent messages that must remain visible, such as system statuses or warnings the user needs to act on.

Icon

Alerts may include an icon to reinforce meaning. The icon should support, not replace, the message text.

We have received your application and will send updates to your registered email address.

Use when the message is self-explanatory or when a minimal, text-only appearance is preferred.

Title

Alerts can include a title to summarise the message and provide hierarchy, especially for longer or more complex content.

Your draft has been saved and you can continue editing it before submission.

Use for short, single-line messages that are easy to scan without an additional heading.

Slot

The default slot can contain supplementary content such as links or supporting actions, as long as the message remains clear and easy to scan.

Your progress has been saved. You can return to this draft before the submission deadline.

Use when the alert message is complete without extra supporting content.

Playground

BETA
Description with inline link
OutlinedDismissibleWith iconTitle

Structure

Your application has been submitted successfully and a confirmation email has been sent to you.

Component tokens

Component tokens are specific to Alert. Use the table title as the prefix: padding-x under sgds/alert means sgds/alert/padding-x; bg-emphasis under sgds / alert / info means sgds/alert/info/bg-emphasis.

sgds/alert
CategoryComponent tokenSemantic tokenValuePaddingpadding-xsgds/padding/lg20pxpadding-ysgds/padding/lg20pxcontent-padding-rightsgds/padding/2-xl32pxGapgapsgds/gap/sm12pxtitle-gapsgds/gap/2-xs4pxcontent-gapsgds/gap/md16pxBorderborder-widthsgds/border-width/11pxborder-radiussgds/border-radius/md8px
sgds / alert / info
CategoryComponent tokenSemantic tokenValueColourbg-emphasissgds/primary/surface-default#6B4FEBbg-mutedsgds/primary/surface-muted#F4F2FEborder-colorsgds/primary/border-color-muted#E1DBFB
sgds / alert / success
CategoryComponent tokenSemantic tokenValueColourbg-emphasissgds/success/surface-default#0E7C3Dbg-mutedsgds/success/surface-muted#E3F9EDborder-colorsgds/success/border-color-muted#B1EDCB
sgds / alert / danger
CategoryComponent tokenSemantic tokenValueColourbg-emphasissgds/danger/surface-default#CF2323bg-mutedsgds/danger/surface-muted#FCF1F1border-colorsgds/danger/border-color-muted#F8D7D7
sgds / alert / warning
CategoryComponent tokenSemantic tokenValueColourbg-emphasissgds/warning/surface-default#FCDE63bg-mutedsgds/warning/surface-muted#FEF4CBborder-colorsgds/warning/border-color-muted#FCDE63
sgds / alert / neutral
CategoryComponent tokenSemantic tokenValueColourbg-emphasissgds/neutral/surface-emphasis#525252bg-mutedsgds/neutral/surface-muted#F3F3F3border-colorsgds/neutral/border-color-muted#DFDFDF

Usage

When to use

  • Use alert for important inline feedback that affects the task or page the user is on.
  • Use the alert variant that matches the message severity and required response.

When not to use

  • Do not use alert for routine supporting text or content that belongs in the page body.
  • Do not show several alerts of equal priority when one clear message is enough.

Best practices

Review the latest guidance before submitting your application. Read the details
Review the latest guidance before submitting your application. Read the details
Match the alert to the message

A clear title, short body, and suitable variant help users understand what needs attention.

Review the latest guidance before submitting your application. Read the details
Review the latest guidance before submitting your application. Read the details
Review the latest guidance before submitting your application. Read the details
Review the latest guidance before submitting your application. Read the details
Do not flood the page with alerts

Too many alerts compete for attention and make it harder to spot the message that matters.

Accessibility considerations

Built-in accessibility

Alerts expose their message as an alert region when they are shown.

Dismissible alerts use the SGDS close button for the close action.

  • The alert container uses `role="alert"` and updates `aria-hidden` based on its shown state.
  • Alert links render as anchors, so they keep native link behaviour.

Labels and content

  • Write the message so users can understand what happened and what to do next.
  • Use links only when they help users act on the alert.

Focus and interaction

  • Do not move focus to an alert automatically unless the alert interrupts the current task.
  • If an alert includes a link or close button, keep it in a logical tab order.

Keyboard interaction

This component does not have a separate keyboard interaction table because:

  • The alert container is a status region, not a keyboard control.
  • Links or close buttons inside an alert use their own native keyboard behaviour.

Updates

DateVersionDescriptionLoading updates…

Roadmap

Planned itemStatusTargetFuture enhancements for alertPlannedTBD

Feedback

Have suggestions or feedback?

Share them with us on Slack → #design-system-feedback

Bug Reports

Found a bug or issue?

Report it on GitHub Issues → sgds/components/alert

Singapore Government Design System

The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.