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

Hold press to show tooltip #979

Open
auctumnus opened this issue Aug 3, 2023 · 3 comments
Open

Hold press to show tooltip #979

auctumnus opened this issue Aug 3, 2023 · 3 comments

Comments

@auctumnus
Copy link

I'm trying to use this library to make a wrapper that follows Material 3, but I need to be able to have the tooltip appear on a long press, the way that the design system describes, but I'm not sure that this is possible through this library. Normally, I could solve this by adding my own logic to shown and so on, but a slot won't take an event listener.

I'm not sure what the API would look like for this, and it seems like a really specific use case, so I'm unsure how well this fits, but it's impossible to do it without the internals.

@Akryum
Copy link
Owner

Akryum commented Aug 13, 2023

Normally, I could solve this by adding my own logic to shown and so on, but a slot won't take an event listener.

Not sure why you couldn't implement what you are looking for

@auctumnus
Copy link
Author

ended up doing this with an extraneous <div> around the target slot which i feel like i should not need to do

@Akryum
Copy link
Owner

Akryum commented Aug 31, 2023

You can put :triggers=[] and control the popper however you like, for example by adding event listeners on the button in the default slot.

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

2 participants