<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Navbar</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNavDropdown">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link active" aria-current="page" href="#">Home</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Features</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">Pricing</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="dropdown_btn" role="button" data-bs-toggle="dropdown" aria-expanded="false">
            Hover Me
          </a>
          <ul class="dropdown-menu" aria-labelledby="dropdown_btn">
            <li><a class="dropdown-item" href="#">Action</a></li>
            <li><a class="dropdown-item" href="#">Another action</a></li>
            <li><a class="dropdown-item" href="#">Something else here</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>
//Bootstrap 5 Hoverable Dropdown by Ahmet Kucukonder (Required JQuery)
$(document).ready(function () {
  if (window.innerWidth > 992) {
    let btn = $("#dropdown_btn"); //Your Button's Class Name or ID
    let menu = $(".dropdown-menu"); //Your Dropdown Menu Class Name or ID

    let check = menu.attr("data-bs-popper");
    btn.hover(function () {
      setTimeout(function () {
        checker();
      }, 200);
    });

    menu.on("mouseleave", function () {
      checker();
    });

    function checker() {
      if (check == "none") {
        btn.removeClass("show active");
        menu.removeClass("show");
        menu.removeAttr("data-bs-popper");
      } else {
        btn.addClass("show active");
        menu.addClass("show");
        menu.attr("data-bs-popper", "none");
      }
      check = menu.attr("data-bs-popper");
    }
  }
});

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap.min.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.2/js/bootstrap.min.js