Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I make a widget be visible only when another is hovered? #325

Open
RubenVerg opened this issue Oct 5, 2024 · 0 comments
Open

How do I make a widget be visible only when another is hovered? #325

RubenVerg opened this issue Oct 5, 2024 · 0 comments

Comments

@RubenVerg
Copy link

I'm trying to make a widget appear on hovering another component; I would like for the hoverable component to be in a zstack with the hover result, but even putting them next to each other in a vstack doesn't seem to work. Here's what I thought would work:

buildUI wenv model = let
  b = label "hover me" `styleBasic` [border 2 green] `styleHover` [border 2 red]
  h = label "hovered!" `styleBasic` [border 2 blue] `nodeVisible` isNodeHovered wenv b
  in vstack [b, h]

When I hover on b, nothing happens. What's the correct way to do what I want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant