Skip to content

How to toggle menu on hover? #3482

Answered by snowystinger
amirhhashemi asked this question in Q&A
Discussion options

You must be logged in to vote

You can control the state using the stately package. And you can use useHover to listen for hover changes. Then you can open whenever you get a hover change true.
A word of caution. Make sure you also open for press and long press for accessibility. Do not rely on hover. Otherwise you'll find yourself broken on mobile.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@amirhhashemi
Comment options

Answer selected by amirhhashemi
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants