-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Tooltip component #65
Comments
@saeedalipoor I think this would be quite useful for some plugins, and it would bring the UI library even closer to Figma’s native UI. However, the desired UX seems decidedly non-trivial to implement. A big challenge I see is how to not bloat the bundle when the component consumer chooses to not use the tooltip feature 🤔 |
We can ignore the idea of tooltip properties to keep the bundle lighter and just have the tooltip component that can wrap any node as an anchor point. |
There are some existing library handle the Tooltip part, namely the But as @yuanqing said, these feature include extraneous dependencies, around 5~10KB gzip size. As a developer I might want to handle tooltip by myself. And if the overflow issue is not a concern, css-tooltip on data attribute might be enough for simple tooltip title. Should this library bundle an existing solution or providing some hand-made Component? |
Do we know how native Figma tooltips are coded? From some googling it seems like creating custom tooltips with React Portals is pretty straightforward and wouldn't require any external libs. |
Any updates on this? I'd love to use a tooltip |
An interim workaround is to just add a
One solution to not bloat the bundle is to require the use of a |
I think This would be how the tooltip component can be used:
or
Also, Textbox components would be much more usable if tooltip properties could be passed to them.
Little detail about the delay:
A feature that keeps tooltips in the viewport while the anchor is visible would also be great.
The text was updated successfully, but these errors were encountered: