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:

Accessibility of status variants

Since a callout’s status is conveyed visually through its icon and background color, Filament also announces it to screen readers. When you use a status variant, a visually-hidden severity prefix (Error:, Note:, Success:, or Warning:) is rendered inside the callout’s heading, so assistive technology users hear the severity before the message. The leading icon is marked as decorative (aria-hidden) so it is not announced separately. Callouts render as a plain <div>, which is correct for content that is present when the page loads. If you reveal a callout dynamically (for example, after an action completes) and want screen readers to announce it, opt into a live region using extraAttributes():

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: