Callout
Notifies users about important information related to their actions inside a Forms. Callouts can indicate success, warnings, errors, or provide additional information depending on the context inside a form.
Title
A description to explain the success, warning, info or error event
Usage
Examples
Variant
Use the variant
prop to change the callout style!
Title
A description to explain the success, warning, info or error event
Title
A description to explain the success, warning, info or error event
Title
A description to explain the success, warning, info or error event
Title
A description to explain the success, warning, info or error event
Layout
A basic callout consisting of title and action will be displayed an inline manner, while callouts with all three elements (title, content & action) will be displayed in a stacked manner.
Title
Title
A description to explain the success, warning, info or error event
Dismissible
If the callout is dismissible, you can display a close button on the top right corner by declaring the dismissible
prop.
To capture the dismiss event, you may use the onDismiss
prop.
To dismiss the callout via event listener, simply wrap the target element with CalloutClose
. CalloutClose
will also trigger the onDismiss event, if defined.
Basic - Uncontrolled Dismiss State
You may capture the dismiss event using the onDismiss prop. Check the console for the dismiss event.
Action - Dismiss Callout via CalloutClose
You can attach closing functionality of the Callout by wrapping the target element
Props
Callout
Prop | Type | Default |
---|---|---|
variant | enum | info |
dismissible | boolean | - |
onDismiss | () => void | - |