© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
26 replies
botaviator1990

Button with Modal Popup

How to create simple link OR button in Filament livewire which ideally open a Modal popup?
Solution
<!-- resources/views/custom-view.blade.php -->
<div>
    <x-filament::modal id="myModal">
        <x-slot name="heading">
            Title
        </x-slot>

        <div>
            Content...
        </div>

        <x-slot name="footer">
            <x-filament::button type="button" @click="$dispatch('close-modal', {id: 'myModal'})">Close</x-filament::button>
        </x-slot>
    </x-filament::modal>

    <x-filament::button type="button" @click="$dispatch('open-modal', {id: 'myModal'})">Open Modal</x-filament::button>
</div>
<!-- resources/views/custom-view.blade.php -->
<div>
    <x-filament::modal id="myModal">
        <x-slot name="heading">
            Title
        </x-slot>

        <div>
            Content...
        </div>

        <x-slot name="footer">
            <x-filament::button type="button" @click="$dispatch('close-modal', {id: 'myModal'})">Close</x-filament::button>
        </x-slot>
    </x-filament::modal>

    <x-filament::button type="button" @click="$dispatch('open-modal', {id: 'myModal'})">Open Modal</x-filament::button>
</div>


Forms\Components\View::make('custom-view')
Forms\Components\View::make('custom-view')
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 popup on bulk action
FilamentFFilament / ❓┊help
3y ago
Livewire component modal with next button
FilamentFFilament / ❓┊help
3y ago
Modal Popup on 'ImageColumn' Click - Table
FilamentFFilament / ❓┊help
2y ago
Show relation table into modal popup
FilamentFFilament / ❓┊help
3y ago