Hide the chevron icon by default in dropdown and sho it on hover #2759
-
Here is what my ui (below), I want to hide the chevron icons by default and when I hover on item(let's say project 2) it shows. |
Beta Was this translation helpful? Give feedback.
Answered by
saadeghi
Jan 17, 2024
Replies: 2 comments 3 replies
-
Can you share your HTML? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Cleaner way - |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wouldn't advise using dropdowns inside each other. It would be confusing for users but anyway,
A quick, easy way would be adding
[&>li>details>summary]:after:opacity-0 [&>li>details:hover>summary]:after:opacity-100
class names to the<ul>
. The first class sets 0 opacity to the chevron and the second class sets opacity to 1 when<li>
is hovered.Example: https://play.tailwindcss.com/oJd85fnJT7