Dismiss a surface
Use close buttons on dismissible surfaces such as modals, drawers, alerts, and toasts.
A close button dismisses surfaces such as modals, drawers, alerts, and toasts.
Use close buttons on dismissible surfaces such as modals, drawers, alerts, and toasts.
The close icon is recognised in compact surfaces where text would take too much room.
Built-in hover, focus, and disabled states keep the control predictable.
Button container
Close icon
The close button tone adjusts the icon colour so it remains visible on different background contexts.
The default tone for use on standard light surfaces such as modals, drawers, and inline alerts.
Close button sizes let you match the visual weight of the dismiss control to the surface it sits within.
The default size. Use for most surfaces such as modals, drawers, and standard alerts.
Use disabled only when the close action is temporarily unavailable and the reason is clear.
Use when the close action is available.
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.
sgds-border-width-11pxsgds-dimension-32—sgds-outline-focus—sgds-outline-offset-focus—sgds-close-btn-border-radius—This surface can be dismissed without saving.
Pair the close button with surfaces users can leave without committing: modals, drawers, toasts, and alerts.
The close button only dismisses. For actions that save or submit work, use a labelled button so the outcome is clear.
Use fixed-light on dark surfaces and fixed-dark on light fixed surfaces so the icon keeps enough contrast.
On dark or strongly coloured backgrounds, the default tone can fall below contrast. Use a fixed tone.
Set size to sm inside compact surfaces such as toasts or inline alerts so the dismiss control fits in.
Anchor the close button inside or at the corner of the surface it controls so the relationship stays clear.
TabShift+TabEnterSpaceShare them with us on Slack → #ask-sgds-v3
Report it on GitHub Issues → sgds/components/close-button
The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.