Browse Components

Components

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

Show timely messages

Use alerts for information that affects the task or page the user is viewing.

Make severity clear

Choose info, success, warning, danger, or neutral to match the message.

Keep users on the page

Inline alerts sit with the content, so users can read the message and continue.

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 do not 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 to reinforce the alert's meaning with a recognisable visual cue. The icon should support, not replace, the message text.

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 when the alert contains longer or more detailed content that benefits from a clear summary heading.

Slot

The default slot can contain supplementary content such as links or supporting actions, as long as the message stays clear and scannable.

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.

Structure

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

Design tokens used

Each row is a colour, spacing, or size value the component uses, and the right-most column tells you where in the component you'll see it.

CategoryTokenValueWhere it's usedPaddingsgds-padding-lg20pxsgds-padding-lg20pxsgds-padding-2-xl32pxGapsgds-gap-sm12pxsgds-gap-2-xs4pxsgds-gap-md16pxBordersgds-border-width-11pxsgds-border-radius-md8pxsgds-font-size-body-smsgds-font-size-subtitle-smsgds-font-weight-regularsgds-font-weight-semiboldsgds-line-height-2-xsHeight variessgds-outline-focussgds-outline-offset-focus

Usage

When to use

  • Use alert for 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
Match the alert to the message

Use the variant that reflects the message severity so users can understand the status quickly.

Review the latest guidance before submitting your application.
Check your documents before you continue.
We could not save one part of the form.
Your progress will be saved automatically.
This service keeps drafts for 30 days.
Do not flood the page with alerts

Too many alerts compete with the page content. Prioritise the message users need most.

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

DateVersionDescription19 May 2026v3.19.1Text color token in #668.29 Apr 2026v3.18.0Visual refinement on border and new action slot in #604.17 Apr 2026v3.17.0Close button colour fixed dark in warning filled in #594.

Roadmap

Planned itemStatusTargetFuture enhancements for alertPlannedTBD

Feedback

Have suggestions or feedback?

Share them with us on Slack → #ask-sgds-v3

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.

Past VersionsSGDS v1SGDS v2