Navbar accordion

Hello, I would like to know if there is any way to change the behavior of my navigation bar in my filamentphp project so that it behaves like an accordion, without having to use the larazeus plug-in. I would like only one group to be displayed at a time of all the ones I have.Thanks
No description
5 Replies
Dennis Koch
Dennis Koch3mo ago
Not out of the box. You could register some JS to do it, though.
MaxwellDan
MaxwellDanOP3mo ago
Where should I implement the js to be able to edit the navigation bar or aside as I call it, I have tried to publish the filament views but that section is not published, so I cannot edit the behavior of my groups so that they cannot all be collapsed at once, but rather an accordion type.
Dennis Koch
Dennis Koch3mo ago
Please don't publish the views. I'd try adding some JS file via the Filaments assets system or just something as a render hook. I think it's toggle via Alpine though. I'm not sure whether/how you can access the Alpine data, but I guess there should be a way.
MaxwellDan
MaxwellDanOP3mo ago
I haven't been able to do it in any way, please if someone has a more specific idea that could help me that would be great.

Did you find this page helpful?