© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
5 replies
Jamie Cee

Loading indicator on a custom action with alpineClickHandler

My action process is ran with alpinejs component rather than a submit action
    public function securityKeyAction(): Action
    {
        $name = \App\Services\TwoFactorService::SECURITY_KEY_METHOD;
        return Action::make("securitykey")
            ->label("Register new key")
            ->icon('heroicon-c-plus-circle')
            ->color('success')
            ->hidden(function () use ($name) {
                return $this->config['methods'][$name]['enabled'] ? false : true;
            })
            ->extraAttributes(['x-data' => 'registerPasskey', 'x-show' => 'browserSupportsWebAuthn()'])
            ->alpineClickHandler('register("' . Str::random(10) . '")');
    }
    public function securityKeyAction(): Action
    {
        $name = \App\Services\TwoFactorService::SECURITY_KEY_METHOD;
        return Action::make("securitykey")
            ->label("Register new key")
            ->icon('heroicon-c-plus-circle')
            ->color('success')
            ->hidden(function () use ($name) {
                return $this->config['methods'][$name]['enabled'] ? false : true;
            })
            ->extraAttributes(['x-data' => 'registerPasskey', 'x-show' => 'browserSupportsWebAuthn()'])
            ->alpineClickHandler('register("' . Str::random(10) . '")');
    }


But I want to display a loading indicator while it goes through the flow, but cant seem to find a way to show the indicator.

The blade is rendering just with
```php
{{$this->securityKeyAction}} rather than blade components for the button etc
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

Filamentphp 4 Action loading indicator
FilamentFFilament / ❓┊help
7d ago
loading indicator problem in action
FilamentFFilament / ❓┊help
6mo ago
Is it possible to add loading indicator on a custom Action Button
FilamentFFilament / ❓┊help
2y ago
select with loading indicator
FilamentFFilament / ❓┊help
2y ago