Lazy-ui
Lazy-ui
registry components
DocsComponentsBlocksChangelog
GitHub0Install
Navigation11 groups
Get StartedDocs
  • Introduction
  • Installation
  • Changelog
  • All Components
Background13 items
  • Wave CipherNew
  • Horizon CipherNew
  • Orbit CipherNew
  • Orbit BloomNew
  • Orbit MeshNew
  • Aurora MeshNew
  • Chroma FlowNew
  • Prism DriftNew
  • Shadow MeshNew
  • Slime BackgroundNew
  • NeumorphismNew
  • Ripple SurfaceNew
  • Liquid ChromeNew
Text Animate7 items
  • Shiny Text
  • Text WarpNew
  • Text RiseNew
  • Text SpinNew
  • Text ScrambleNew
  • Spinning TextNew
  • Text FlipNew
Animate6 items
  • Counter
  • Liquid RevealNew
  • Liquid TransitionNew
  • Matrix GridNew
  • Particle HaloNew
  • Bling TransitionNew
Effects2 items
  • Reveal Animate
  • Circle CipherNew
Forms2 items
  • Switch
  • Checkbox
Buttons3 items
  • Copy Button
  • GitHub Stars Button
  • Glass ButtonNew
Feedback1 item
  • Progress
Navigation1 item
  • Animated Tabs
Overlay1 item
  • Animate Tooltip
Device Mocks1 item
  • iPhoneNew

Animate Tooltip

Radix Tooltip with motion entrance, shared slide transitions, and optional cursor follow.

animate-tooltip
0px

Customize

Edit props; preview updates instantly.

Customize
Side
Side Offset
6px
Delay (ms)
150ms
Follow cursor

Props

Props accepted by AnimateTooltip.

PropTypeDefaultDescription
childrenReactElement—The trigger — a single React element. AnimateTooltip clones it to attach pointer/focus handlers and a ref.
contentReactNode—The tooltip body.
side"top" | "right" | "bottom" | "left" | "auto""top"Which side of the trigger to anchor to. `"auto"` picks the side from where the cursor enters the trigger — top half → top, bottom half → bottom, left/right by dominant axis.
sideOffsetnumber6Pixel gap between the trigger and the tooltip.
align"start" | "center" | "end""center"Alignment along the chosen side.
alignOffsetnumber0Pixel offset along the alignment axis.
delayDurationnumber150Delay before the first hover opens the tooltip (ms). Forwarded to the auto-wrapped `TooltipProvider`'s `openDelay`.
arrowbooleanfalseShow the small arrow pointing at the trigger.
followCursorboolean | "x" | "y"falseLet the tooltip drift toward the cursor while it hovers the trigger. `true` follows on both axes; `"x"` or `"y"` constrains to one axis.
classNamestring—Extra class names merged onto the content.

Installation

Choose CLI for the one-line shadcn install, or copy the file manually.

npx shadcn@latest add https://2lazyui.com/r/animate-tooltip.json

Usage

Import the component and drop it into a render.

demo.tsx23 lines
import {
  AnimateTooltip,
  AnimateTooltipGroup,
} from "@/components/lazy-ui/animate-tooltip";

export function Demo() {
  return (
    <AnimateTooltipGroup>
      <div className="flex gap-3">
        <AnimateTooltip content="First tip" side="auto" arrow>
          <button className="rounded bg-white px-3 py-1.5 text-sm text-black">
            One
          </button>
        </AnimateTooltip>
        <AnimateTooltip content="Slides over from One" side="auto" arrow>
          <button className="rounded bg-white px-3 py-1.5 text-sm text-black">
            Two
          </button>
        </AnimateTooltip>
      </div>
    </AnimateTooltipGroup>
  );
}

Credits

Radix TooltipProvider, trigger, portal, and positioning primitives.Motion for ReactShared layout slide and cursor-follow spring.
Registryv0.1
Animated TabsNavigationCopy ButtonButtonsGitHub Stars ButtonButtonsReveal AnimateEffectsCounterAnimateShiny TextText AnimateText WarpText AnimateText RiseText AnimateText SpinText AnimateText ScrambleText AnimateSpinning TextText AnimateText FlipText AnimateProgressFeedbackSwitchFormsGlass ButtonButtonsCheckboxFormsiPhoneDevice MocksCircle CipherEffectsLiquid RevealAnimateLiquid TransitionAnimateWave CipherBackgroundHorizon CipherBackgroundOrbit CipherBackgroundOrbit BloomBackgroundOrbit MeshBackgroundMatrix GridAnimateParticle HaloAnimateAurora MeshBackgroundChroma FlowBackgroundPrism DriftBackgroundShadow MeshBackgroundSlime BackgroundBackgroundNeumorphismBackgroundRipple SurfaceBackgroundLiquid ChromeBackgroundBling TransitionAnimateAnimate TooltipOverlayPricing · ClassicBlocks · PricingPricing · BentoBlocks · PricingPricing · EditorialBlocks · PricingPricing · MatrixBlocks · PricingPricing · UsageBlocks · Pricing
Browse all 42 components
Up nextRoadmap
DialogPlanned
TabsPlanned
TooltipPlanned
CommandPlanned
Help the project
Star on GitHubSuggest a componentRead the DESIGN.md