© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3mo ago•
23 replies
keiron

Use a different color for profile header action button vs confirmation dialog

I've got some really nice black on white background buttons in my navigation (see attached photo).

I need to add a confirmation dialog to one of them. However, the confirmation dialog uses the same styling and looks horrible (see attached photo).

Is it possible to have ->color('secondary') on the button but ->color('warning') on the dialog?
Screenshot_2025-11-13_at_9.28.37_am.png
Screenshot_2025-11-13_at_9.29.22_am.png
Solution
<?php

namespace App\Filament\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;

class ListUsers extends ListRecords
{
protected static string $resource = UserResource::class;

protected function getTableActions(): array
{
return [
Actions\Action::make('resetPassword')
->label('Reset password')
->icon('heroicon-o-exclamation-triangle')
->color('warning')
->requiresConfirmation()
->modalIcon('heroicon-o-exclamation-triangle')
->modalIconColor('warning')
->modalHeading('Reset password')
->modalDescription('Are you sure you want to reset this user's password?')
->modalSubmitActionLabel('Confirm')
->modalCancelActionLabel('Cancel')
->modalActions([
Actions\Action::make('submit')
->label('Confirm')
->color('warning') // Here we set the color of the confirm button
->submit(),
Actions\Action::make('cancel')
->label('Cancel')
->color('gray') // The cancel button color
->cancel(),
])
->action(function ($record): void {
// Here you can perform your reset logic for the specific user
$record->update(['password' => bcrypt('new-password')]);

// Optionally, send a notification
// Notification::make()
// ->title('Password for ' . $record->name . ' has been reset.')
// ->success()
// ->send();
}),
];
}
}


try this
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

`requiresConfirmation(false)` still shows confirmation dialog for Delete action
FilamentFFilament / ❓┊help
2y ago
Table Header Action Confirmation not work
FilamentFFilament / ❓┊help
2mo ago
Header action button not refreshing
FilamentFFilament / ❓┊help
2y ago
Header action button click issue
FilamentFFilament / ❓┊help
3y ago