© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
thyk123

is it possible to add loading screen

I want to ask is it possible to add loading state in forms\components\section while make all the component ready after update?
If possible how to achive that? Thank you!
Solution
Something like this

Forms\Components\Section::make([
    Forms\Components\Placeholder::make('')
        ->content(new HtmlString(<<<'BLADE'
            <div wire:loading wire:target="data.title">
                Loading...
            </div>
        BLADE
        )),
    Forms\Components\TextInput::make('title')
        ->live(onBlur: true)
        ->afterStateUpdated(function (Forms\Set $set, ?string $state) {
            $set('slug', str($state)->slug());
        }),
    Forms\Components\TextInput::make('slug')
])
Forms\Components\Section::make([
    Forms\Components\Placeholder::make('')
        ->content(new HtmlString(<<<'BLADE'
            <div wire:loading wire:target="data.title">
                Loading...
            </div>
        BLADE
        )),
    Forms\Components\TextInput::make('title')
        ->live(onBlur: true)
        ->afterStateUpdated(function (Forms\Set $set, ?string $state) {
            $set('slug', str($state)->slug());
        }),
    Forms\Components\TextInput::make('slug')
])
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

SelectColumn it is possible to add allowHtml?
FilamentFFilament / ❓┊help
8mo ago
Is it possible to add actions to widgets?
FilamentFFilament / ❓┊help
3y ago
Is it possible to add loading indicator on a custom Action Button
FilamentFFilament / ❓┊help
2y ago
Is it possible to add navigation on top?
FilamentFFilament / ❓┊help
3y ago