Topic: Sidenav toggle slim issue priority asked 2 years ago

Using button with id="slim-toggler" insde nav tags

<nav id="sidenav-4" class="sidenav" data-mdb-mode="side" data-mdb-slim="true" data-mdb-slim-collapsed="true" data-mdb-content="#slim-content" >


document.getElementById('slim-toggler').addEventListener('click', () => { slimInstance.toggleSlim(); })

Any time a category is opened and then closed, not matter if side-nav was collapsed or not it is turned into a slim version of the sidenav. How should it be managed in order to use slim-toggler inside the nav?


Michał Duszak staff answered 2 years ago

Hello, I prepared a working snippet for you. See if it works for you. priority answered 2 years ago

It works just fine, thank you!

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Laptop HP ZBook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: Yes