Edit page

Alert

An alert is an element that displays a brief, important message in a way that attracts the user's attention without interrupting the user's task —WAI-ARIA-Practices-1.1

Basic Usage

This is a very simple component and applies role="alert" to whatever element you decide to spread props on.

🚨 Here is some important info for you 📣

Props

children

function({}) | required

This is the only required prop. children is our render prop and must be a function. It is called with an object argument:

propertytypedescription
getPropsfunction(props: object)returns the props for the alert element (e.g., a div)