© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
12 replies
Mateus

action button in topbar

Hi! I'm trying to put an action button on the topbar, but nothing is happening when I click on the action.

My code is like this:
Livewire component:
public function customAction(): Action
    {
        return Action::make('Buscar Pacote')
                ->requiresConfirmation()
                ->label('Custom Action')
                ->color('gray');
    }
    public function render()
    {
        return view('livewire.scan-action');
    }
public function customAction(): Action
    {
        return Action::make('Buscar Pacote')
                ->requiresConfirmation()
                ->label('Custom Action')
                ->color('gray');
    }
    public function render()
    {
        return view('livewire.scan-action');
    }

Hook on the panel provider:
return $panel
        ->renderHook(
            PanelsRenderHook::GLOBAL_SEARCH_BEFORE,
                fn (): string => Blade::render('@livewire(\'scan-action\')'),
        )
return $panel
        ->renderHook(
            PanelsRenderHook::GLOBAL_SEARCH_BEFORE,
                fn (): string => Blade::render('@livewire(\'scan-action\')'),
        )
Solution
Ah, it’s because the name of the action doesn’t match the output in the blade file.

Action::make(‘custom’)

{{ $this->customAction }}
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Action button on Topbar
FilamentFFilament / ❓┊help
2y ago
Add Action Button on Topbar
FilamentFFilament / ❓┊help
17mo ago
Adding Custom Action to TopBar
FilamentFFilament / ❓┊help
2y ago