Introduction
The loading indicator is an animated SVG that can be used to indicate that something is in progress:
Replacing the default loading indicator
Filament renders the loading indicator through the Filament\Support\Contracts\LoadingIndicator contract, which is bound to Filament\Support\View\DefaultLoadingIndicator by default. You may replace it with your own implementation by binding a different class in a service provider:
Your class must implement the LoadingIndicator contract, whose toHtml() method receives a ComponentAttributeBag and returns the indicatorās HTML:
The attributes already contain the fi-icon fi-loading-indicator and size hook classes, so you can forward them directly to your root element.
The resolved LoadingIndicator instance is cached for the lifetime of the PHP process. Under Laravel Octane, this means the binding is only resolved once when the worker boots and will not be re-resolved between requests. Register your binding in a service provider rather than rebinding it at runtime.