| ariaCloseLabel5.13.0+ | Close | string |
Sets the aria-label of the dismissible close button. |
| className | - | string |
A string of all className you want applied to the component. |
| colorDeprecated 6.0.0 | - | 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'inverse', string |
Sets the color context of the component to one of CoreUI’s themed colors. Use theme instead — color renders the same theme-{color} class and loses to theme when both are set. |
| defaultShow6.0.0+ | - | boolean |
The initial visibility of an uncontrolled alert — read once on mount. |
| dismissible | - | boolean |
Optionally add a close button to alert and allow it to self dismiss. |
| onClose | - | (() => void) |
Callback fired when the component requests to be closed. |
| onClosed5.13.0+ | - | (() => void) |
Callback fired when the component has been closed and the CSS transition has completed. |
| onShowChange6.0.0+ | - | ((show: boolean) => void) |
Callback fired when the alert requests a visibility change — the dismiss button or, in uncontrolled mode, any internal toggle. In controlled mode update show yourself, or the alert stays as it is. |
| show6.0.0+ | - | boolean |
Control the visibility. When set, the alert renders what show says and the dismiss button only calls onShowChange — nothing closes until the parent flips the prop. |
| theme6.0.0+ | - | 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'inverse', string |
Sets the color context of the component to one of CoreUI’s themed colors. |
| transition5.13.0+ | true | boolean, 'fade', 'size' |
Set how the alert animates as it is shown and hidden: 'fade' fades it, 'size' collapses its box as well, and false removes the animation. |
| variant | - | 'solid' |
Set the alert variant to a solid. |
| visibleDeprecated 6.0.0 | - | boolean |
Toggle the visibility of component. Use defaultShow / show / onShowChange instead — visible is ignored when either of them is set. |