react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

Add animations for tooltip

Open RG100-EMUX opened this issue 7 years ago • 8 comments

Good day! I want to add animations for show tooltip (fadeIn, fadeOut), i sending a className prop and this class add animation for opacity, but it's not work! How can I add animations?

RG100-EMUX avatar Jun 27 '17 07:06 RG100-EMUX

Yes, I also found the ability to add className quite useless if not adding !important all over the place. Also, it'd be really nice to be able to add animations.

bel0v avatar Jul 14 '17 12:07 bel0v

@FoxWhite it's will be nice.

RG100-EMUX avatar Jul 15 '17 09:07 RG100-EMUX

Any updates on this one if it's possible to modify the animation?

webchaz avatar Aug 10 '17 00:08 webchaz

Is this possible in a newer version? The fade out animation is rather abrupt right now.

PaulRBerg avatar May 19 '19 20:05 PaulRBerg

.__react_component_tooltip { transition: all 0.3s ease-in-out !important; opacity: 0 !important; visibility: visible; }

.__react_component_tooltip.show { visibility: visible; opacity: 1 !important; }

zackypick avatar Dec 10 '19 16:12 zackypick

Had some weirdness with the above snippet (the tooltip teleports on the first hover, slides in horizontally on the second, and then works fine); all that seems to be necessary is:

.__react_component_tooltip {
	transition: opacity 0.3s ease-in-out !important;
	visibility: visible;
}

karashiiro avatar Sep 27 '20 00:09 karashiiro

The fix above posted by @zackypick worked for me, but transitioning all properties did give a similar bug as described by @karashiiro. I am doing some custom positioning so that's probably come into play. The fix for me was to animate opacity and visibility instead of all.

.__react_component_tooltip {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-out !important;
  opacity: 0 !important;
  visibility: visible;
}

.__react_component_tooltip.show {
  visibility: visible;
  opacity: 1 !important;
}

jveens avatar Apr 09 '21 14:04 jveens

The fix above posted by @zackypick worked for me, but transitioning all properties did give a similar bug as described by @karashiiro. I am doing some custom positioning so that's probably come into play. The fix for me was to animate opacity and visibility instead of all.

.__react_component_tooltip {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-out !important;
  opacity: 0 !important;
  visibility: visible;
}

.__react_component_tooltip.show {
  visibility: visible;
  opacity: 1 !important;
}

Is this possible with Next.js?

Johnrobmiller avatar Sep 14 '21 22:09 Johnrobmiller