Edit page

Alert

Alerts are used to inform users of state changes, errors, or successful actions.

Import Syntax

Basic Usage

Here's a general bit of information

Some kind of contextually relevant content

Something failed

That thing you wanted to do didn't work as expected

red

Network connection interruption detected

yellow

Successfully duplicated 2019 Sales Demographics by County layer

green
Here's a general bit of information

Some kind of contextually relevant content

full

Close Action

Here's a general bit of information

Has close link!

showCloseLabel
Here's a general bit of information

Has close link!

Close
closeLabel="Close"

Icons

Here's a general bit of information

Some kind of contextually relevant content

Something failed

That thing you wanted to do didn't work as expected

Network connection interruption detected

Successfully duplicated 2019 Sales Demographics by County layer

Here's a general bit of information

Some kind of contextually relevant content

icon={<BananaIcon size={16} />}

Props

PropertyTypeRequiredDefaultDescription
onCloseFuncfalse() => {}Callback function fired when the close link is clicked.
childrenNodefalse-Components to be rendered within the Alert.
showIconBoolfalse-Toggles visibility of the icon
iconNodefalse-Manually set an icon rather than use the default
blueBoolfalse-Color modifier for the Alert.
greenBoolfalse-Color modifier for the Alert.
yellowBoolfalse-Color modifier for the Alert.
redBoolfalse-Color modifier for the Alert.
fullBoolfalse-Full-width modifier for the Alert.
showCloseLabelBoolfalse-
closeLabelNodefalse-Display label used to close the Alert.