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:

<ul
    class="list-style-none me-auto flex flex-col ps-0 lg:flex-row"
    data-twe-navbar-nav-ref>
    <li class="mb-4 lg:mb-0 lg:pe-2" data-twe-nav-item-ref>
      <!-- Dashboard link -->
      <a
        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"
        href="#"
        data-twe-nav-link-ref
        >Dashboard</a
      >

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.

FREE CONSULTATION

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

Status

Answered

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