© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
jaocero

Change modal submit button color

Is possible to change this color the action button only by not using the
->color()
->color()
? If I use that it will also change the color in the table action. I only need to change the color in the submit button
Solution
Solve by making custom action class:
<?php

namespace App\Filament\CustomActions;

use Filament\Actions\StaticAction;
use Filament\Tables\Actions\Action;

class CustomAction extends Action
{
    public function getModalSubmitAction(): ?StaticAction
    {
        $action = static::makeModalAction('submit')
            ->label($this->getModalSubmitActionLabel())
            ->submit($this->getLivewireCallMountedActionName())
            ->color($this->getModalIconColor()); // want it to be the same as icon color

        if ($this->modalSubmitAction !== null) {
            $action = $this->evaluate($this->modalSubmitAction, ['action' => $action]) ?? $action;
        }

        if ($action === false) {
            return null;
        }

        return $action;
    }
}
<?php

namespace App\Filament\CustomActions;

use Filament\Actions\StaticAction;
use Filament\Tables\Actions\Action;

class CustomAction extends Action
{
    public function getModalSubmitAction(): ?StaticAction
    {
        $action = static::makeModalAction('submit')
            ->label($this->getModalSubmitActionLabel())
            ->submit($this->getLivewireCallMountedActionName())
            ->color($this->getModalIconColor()); // want it to be the same as icon color

        if ($this->modalSubmitAction !== null) {
            $action = $this->evaluate($this->modalSubmitAction, ['action' => $action]) ?? $action;
        }

        if ($action === false) {
            return null;
        }

        return $action;
    }
}
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

Modal Submit Button V2
FilamentFFilament / ❓┊help
3y ago
Change the color of the Submit button on the Table Action Modal
FilamentFFilament / ❓┊help
2y ago
Change "Submit" button text on an Action Modal?
FilamentFFilament / ❓┊help
3y ago
Change Button Text Color
FilamentFFilament / ❓┊help
3y ago