© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
8 replies
ingeday

open a modal from a navigationitem

Hi.

I would like to add a link in left navigation to open a modal and I put the link with this code in the file
AdminPanelProvider.php
AdminPanelProvider.php


public function panel(Panel $panel): Panel
    {
        return $panel
          ....
                ->navigationItems([
                NavigationItem::make('Abrir')
                    ->icon('heroicon-o-presentation-chart-line')
                    ->group('Simuladores')
                    ->sort(3)
                    ->url('#'),
                
            ])
public function panel(Panel $panel): Panel
    {
        return $panel
          ....
                ->navigationItems([
                NavigationItem::make('Abrir')
                    ->icon('heroicon-o-presentation-chart-line')
                    ->group('Simuladores')
                    ->sort(3)
                    ->url('#'),
                
            ])


The previous code shows the link (image attached), but I want to add something like this inside the link:
 x-on:click="" 
 x-on:click="" 
to open a modal with
 $dispatch("open-modal", { id: "credit-simulator" }) 
 $dispatch("open-modal", { id: "credit-simulator" }) 
assuming I have a modal with that ID.

I have not found how to add that inside an Item of Navigation Panel.

Thanks for reading and helping.

Eday Gonzalez
Screenshot_2024-11-06_at_6.39.35_PM.png
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

open modal from another modal
FilamentFFilament / ❓┊help
3y ago
Open another form modal from a form modal
FilamentFFilament / ❓┊help
10mo ago
Open a modal from checkbox label
FilamentFFilament / ❓┊help
3y ago
Open modal from Column
FilamentFFilament / ❓┊help
3y ago