StatusAlert

basic usage

success alert

danger alert

informational alert

alert with a custom aria-label on the close button

Non-dismissible alert

alert invoked via a button

StatusAlert Props API
  • alertType string Required

    specifies the type of alert that is being diplayed. It defaults to "warning". See the other available bootstrap options.

    Default'warning'
  • className string Required

    is a string array that defines the classes to be used within the status alert.

  • dialog string Required | element Required Required Required
  • dismissible bool Required

    specifies if the status alert will include the dismissible X button to close the alert. It defaults to true.

    Defaulttrue
  • closeButtonAriaLabel string Required
    Default'Close'
  • onClose isRequiredIf(PropTypes.func, props => props.dismissible) Required

    is a function that is called on close. It can be used to perform actions upon closing of the status alert, such as restoring focus to the previous logical focusable element. It is only required if dismissible is set to true and not required if the alert is not dismissible.

  • open bool Required

    specifies whether the status alert renders open or closed on the initial render. It defaults to false.

    Defaultfalse