Alert
Open in Storybook Open in Figma
Alerts are used to display information, warnings, or errors in various positions. You can find real-world examples in the Alerts examples.
Alert is a coloured Card with an Icon on the left, an optional heading and some text.
Rules For Copywriters
Variants
Alerts come in three variants. The choice of the variant has to be evaluated case by case, but there are some rules which help to identify the right one to use.
Info
Info Alert communicates additional contextual information, which is not crucial for a task to be performed.
When to use
When the user can proceed with a task, and there is additional useful information, or a dependency to take note of. For example, a phone number of the advisor/bank in case a transfer is not successful or a request to carefully read or check data before continuing in a flow.
Rules For Designers
- Border and Icon are
$color-ui-blue (#135ee2)
- Background is 20%
$color-ui-blue (#135ee2)
on top of$color-white (#ffffff)
. - The default Icon is
info
.
Warning
Warning Alert shows crucial information with higher emphasis than a hint. However, it is not blocking the user from completing a task.
When to use
- When the user can proceed with a task but is warned that there are consequences to consider in doing so. For example, upon signing a transfer, the user is warned that their account balance will go into overdraft.
- When the user has to take a dedicated action in order to be able to proceed with a task. For example, a warning that specific outdated information needs to be updated to continue.
Rules For Designers
- Border and Icon are
$color-ui-yellow (#f2a91e)
- Background is 20%
$color-ui-yellow (#f2a91e)
on top of$color-white (#ffffff)
. - The default Icon is
warning
.
Error
Error Alert displays critical information which completely blocks the user from proceeding in performing a task.
When to use
- When the user cannot proceed and is blocked from completing a task. This could be a technical error. There is nothing the user can do, except maybe try again. For example, a transaction could not be signed successfully due to an authorization error.
- In a Form to display validation errors. In this case small size has to be used.
Rules For Designers
- Border and Icon are
$color-ui-red (#cf2a1e)
- Background is 20%
$color-ui-red (#cf2a1e)
on top of$color-white (#ffffff)
. - The default Icon is
error-circle
.
Sizes
Alerts come in 3 sizes:
- small
- medium (default)
- large
Small
Small Alerts are usually used as part of the FormField to indicate information related to the field. In addition to the usual Icon, there is also a possibility to specify a Flag instead.
Small Alerts don’t display a heading.
Rules For Designers
- Vertical spacing at the top/bottom of the Card is 10px.
- Icon is 16px.
- Horizontal spacing around the Icon or Flag is 8px.
- Spacing between an input and Alert is 5px.
- Other than that, basic Card rules apply.
Medium
Medium is the default, usual size.
Rules For Designers
- Icon is 16px.
- Spacing to the left of the Icon is 15px.
- Spacing to the right of the Icon is 10px.
- Other than that, basic Card rules apply.
Large
Large Alerts usually require the user to do something, e.g. by pressing a Button in the Alert.
Rules For Designers
- Icon is 48px and is vertically centred in MD+.
- Spacing to the left of the Icon is 15px.
- Spacing to the right of the Icon is 10px.
- Other than that, basic Card rules apply.
Buttons
One or several Buttons may be added to the right side of any Alert.
Rules For Designers
- Buttons use tertiary variant in Small Alerts and secondary variant in medium and large Alerts.
- In MD+ Buttons take up 4 grid columns out of 12.
- In XS and SM Buttons are placed below the content at 100% width.
Closeable
Closeable Alerts feature a close Button in the top-right corner.
Closeable Alert always needs to have a heading. Small Alerts cannot be closeable.
Rules For Designers
- A small tertiary Button with an
error
Icon is used for the close action.- It has a 15px spacing to the top-right corner.
- The Icon is rendered on the right side of the Button.
ModalAlert
ModalAlerts are similar to Alerts. They are never closeable. The heading is rendered as the first sentence of the content, in Emphasis.
CollapsibleAlert
Rules For Designers
- The CollapsibleAlert always needs to have a heading.
- There is no small CollapsibleAlert.
- The collapse/expand caret is a 16px SVG icon. It has a 15px spacing to the top-right corner.
- The colour of the caret is the same as the text colour.