Navigation menu with buttons #1992
Answered
by
benoitgrelard
stuartkeith
asked this question in
Help
-
I have a navigation menu with links, and now need to add a button (a "mailto" link is swapped out with a button that opens a contact form overlay for certain users). It appears that buttons aren't officially supported in a navigation menu - does this mean a navigation menu is no longer appropriate? Nothing's stopping me from adding a button in the JSX but it doesn't really work with the tab and arrow key events. A menu doesn't feel right as 95% of the items are links. |
Beta Was this translation helpful? Give feedback.
Answered by
benoitgrelard
Mar 1, 2023
Replies: 1 comment 4 replies
-
Hey @stuartkeith, you should be able to use <NavigationMenuLink asChild>
<button type="button">My Item</button>
</NavigationMenuLink> |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
stuartkeith
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @stuartkeith, you should be able to use
asChild
for that.