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

Tooltip #6

Open
krvikash35 opened this issue May 6, 2020 · 2 comments
Open

Tooltip #6

krvikash35 opened this issue May 6, 2020 · 2 comments

Comments

@krvikash35
Copy link
Owner

krvikash35 commented May 6, 2020

  • show tooltip on hover on desktop, on mobile show it on long press or just disable it.
  • don't create extra wrapper(div, span)
  • accept position prop(left/right/top/bottom) but align properly at runtime if required. For example if target element is on near left side of screen then position tooltip to right.
  • show arrow as visual guide for tooltip and target element
  • give sensible motion/animation but give props to disable it.
  • use javascript mouse enter and leave event instead of css pseudo class.
  • disappear after short duration
  • appear after short duration
@krvikash35
Copy link
Owner Author

if we don't want extra wrapper for tooltip then either clone element or use hooks.

reach/reach-ui#171

  1. Component based API: target component will be child for Tooltip component, and child component need to forward ref.
  2. Hooks based API: something like useTooltip that accept ref to element.

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