Alert
React alerts give contextual feedback information for common user operations. Component is delivered with a bunch of usable and adjustable alert messages.
Usage
Example
CAlert
CAlert
I am an dismissible alert!
Script
return (
<div className="mt-2">
<CAlert color="primary">CAlert</CAlert>
<CAlert color="secondary">CAlert</CAlert>
<CAlert color="info" closeButton>
I am an dismissible alert!
</CAlert>
</div>
)
# Features
- Temporary or constant visibility
- Optionally dismissible by user
- Optional fading effect
- When visible temporary timer can be tracked and displayed (i.e. via Progress component)
# Alert API
Name | Required | Type | Default Value |
---|---|---|---|
children | any | ||
main tag content | |||
className | string | ||
user classes for the main HTML tag | |||
innerRef | (object | Function | string) | ||
ref to the main tag | |||
onShowChange | Function | ||
on show change event callback | |||
closeButton | boolean | ||
show close button | |||
color | string | ||
defines background color of the alert | |||
fade | boolean | true | |
fade effect | |||
show | (boolean | number) | true | |
show state of the component |