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 programmatically via event listeners inside CalloutAction
's children, you may use the dismiss
function passed as an argument to the render prop.
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 CalloutAction Render Prop
You can invoke the dismiss event programmatically via event listeners inside CalloutAction's children
Props
Callout
Prop | Type | Default |
---|---|---|
variant | enum | info |
dismissible | boolean | - |
onDismiss | function | - |
CalloutAction
Prop | Type | Default |
---|---|---|
children | ReactNode | ((dimiss) => ReactNode) | - |