Skip to main content

Introduction

Callouts are used to draw attention to important information or messages. They are often used for alerts, notices, or tips. You can create a callout using the Callout component:

Using status variants

Callouts have built-in status variants that automatically set the appropriate icon, icon color, and background color. You can use the danger(), info(), success(), or warning() methods:

Removing the background color

By default, status callouts have a colored background. You can remove the background color while keeping the status icon and icon color by using color(null):

Adding a custom icon

You can add a custom icon to the callout using the icon() method:

Changing the icon color

You can change the icon color using the iconColor() method:

Changing the icon size

By default, the icon size is “large”. You can change it to “small” or “medium” using the iconSize() method:

Using a custom background color

You can set a custom background color using the color() method:
You can add actions to the callout footer using the actions() method:
By default, actions are aligned to the start. You can change the alignment using the footerActionsAlignment() method:
The available alignment options are Alignment::Start, Alignment::Center, Alignment::End, and Alignment::Between. You can add custom content to the footer using the footer() method. This accepts an array of schema components:

Adding custom control content

You can add custom content to the controls (top-right corner) using the controls() method. This accepts an array of schema components:

Adding control actions to the callout

You can add control actions to the top-right corner of the callout using the controlActions() method. For example, you could add a dismiss button that hides the callout for the duration of the user’s session: