Topic: Navbar unknown attributes

Felix premium asked 1 month ago

I have a question regarding the TWE navbar: Within the documentation there is this snippit:

    class="list-style-none me-auto flex flex-col ps-0 lg:flex-row"
    <li class="mb-4 lg:mb-0 lg:pe-2" data-twe-nav-item-ref>
      <!-- Dashboard link -->
        class="text-black/60 transition duration-200 hover:text-black/80 hover:ease-in-out focus:text-black/80 active:text-black/80 motion-reduce:transition-none dark:text-white/60 dark:hover:text-white/80 dark:focus:text-white/80 dark:active:text-white/80 lg:px-2"

My question is, what the porpose of the data-twe-navbar-nav-ref, data-twe-nav-item-ref and data-twe-nav-link-ref attributes is. As far as I can see there is no documentation for them or did I miss that.

Bartosz Cylwik staff answered 1 month ago

Hi! Those nav elements may be used by other components (as a reference) for checking whether a different styling/functionalities should be applied.

If the navbar is not added as a child in other TWE elements or do not have other TWE components inside, you can most likely remove those attributes but make sure to test whether everything still works fine without them.

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: Premium
  • Premium support: Yes
  • Technology: TW Elements
  • MDB Version: 2.0.0
  • Device: PC
  • Browser: Firefox
  • OS: Windows 11
  • Provided sample code: Yes
  • Provided link: Yes