You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<UtilityInjectionset="schemaComponents"version="4.x">As well as allowing a static value, the `footer()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
199
199
200
200
<AutoScreenshotname="schemas/layout/callout/footer"alt="Callout with custom footer content"version="4.x" />
201
+
202
+
## Adding custom control content
203
+
204
+
You can add custom content to the controls (top-right corner) using the `controls()` method. This accepts an array of schema components:
205
+
206
+
```php
207
+
use Filament\Actions\Action;
208
+
use Filament\Schemas\Components\Callout;
209
+
210
+
Callout::make('Backup complete')
211
+
->description('Your data has been successfully backed up to the cloud.')
212
+
->success()
213
+
->controls([
214
+
Action::make('dismiss')
215
+
->icon('heroicon-m-x-mark')
216
+
->iconButton()
217
+
->color('gray'),
218
+
])
219
+
```
220
+
221
+
<UtilityInjectionset="schemaComponents"version="4.x">As well as allowing a static value, the `controls()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
222
+
223
+
## Adding control actions to the callout
224
+
225
+
You can add control [actions](../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:
226
+
227
+
```php
228
+
use Filament\Actions\Action;
229
+
use Filament\Schemas\Components\Callout;
230
+
use Filament\Support\Icons\Heroicon;
231
+
232
+
Callout::make('New version available')
233
+
->description('Filament v4 has been released with exciting new features and improvements.')
0 commit comments