Overview
Liquid Tooltip wraps any element and renders a floating label driven by Framer Motion spring values. As the mouse moves across the trigger, the tooltip translates and rotates with spring physics, creating a fluid, organic wobble distinct from standard CSS transitions.Installation
components/rareui/LiquidTooltip.tsx into your project.
Usage
Props
The text content displayed inside the tooltip bubble. Required.
The trigger element the tooltip attaches to. Required.
Position of the tooltip relative to the trigger element. Controls both the offset direction and the enter/exit animation axis.
Additional Tailwind or CSS classes applied to the outer wrapper
<span>.Additional classes applied directly to the tooltip popup
<div>, useful for overriding background color or padding.Examples
All four placements
Custom popup styling
Tooltip on an icon button
Features
Liquid Spring Physics
Position and rotation are driven by Framer Motion spring values for an organic, fluid wobble.
Mouse Parallax Tracking
The tooltip translates along the trigger element in sync with mouse position for subtle depth.
Directional Awareness
Entry and exit animations adapt automatically based on the
placement prop — no manual config needed.Four Placements
Supports
top, bottom, left, and right with correct arrow positioning for each.Composable
Wraps any
React.ReactNode — buttons, links, icons, or arbitrary elements.Dark Mode
Default styles invert between
neutral-900 and neutral-100 based on the active color scheme.