Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

Menu without dropdown


Hi, I want to create a menu that is just a link without a dropdown. How can I do it? I tried it like this. Is this the right way? https://pastebin.com/XXZbk3cX


<div class="menu-item here show">
<!--begin:Menu link-->

Dashboard

<!--end:Menu link-->
</div>


Text formatting options
Submit

Replies (3)


Your approach is not correct because the div element with the class menu-item lacks an actual anchor (<a> tag) to function as a link.Infinite Craft

Correct Way to Create a Menu Link Without a Dropdown
Modify your code to include an <a> tag inside the menu-item div:Drift Boss
<div class="menu-item">
<!--begin:Menu link-->

<span class="menu-title">Dashboard</span>

<!--end:Menu link-->
</div>

Explanation:
Use <a>: The <a> tag is required for navigation.PolyTrack
Use menu-link Class: Metronic uses menu-link to style links correctly.
Use menu-title: Ensures proper alignment with Metronic’s design.
Remove show and here: These classes are typically used for dropdowns or active states.Unblocked Games
Active State (Optional)
If you want to highlight the active page, dynamically add the here class:
<div class="menu-item here">

<span class="menu-title">Dashboard</span>

</div>

Conclusion:Sprunki
This approach ensures that the menu item is a clickable link and follows Metronic’s styling conventions. 🚀



Hi,

Sorry for the late reply. Please browse the templates https://keenthemes.com/metronic and refer to the examples menus and you can find lots of single menu item with links examples. If you need a further help please let us know your Metronic version and demo number.

Regards,
Sean



Your approach is close, but it’s better to use an anchor (`<a>`) tag for a link to ensure proper accessibility and functionality. Here's the corrected version:

```html
<div class="menu-item">
<!--begin:Menu link-->
Dashboard
<!--end:Menu link-->
</div>
```
block blast 2


Text formatting options
Submit
Text formatting options
Submit