Docs / Components / Cursor Tooltip Portal

Cursor Tooltip Portal

A high-performance cursor-anchored tooltip portal with inertial spring tracking, context-aware content switching, and elegant multiline blur-fade reveal transitions.

Hover over card

Dependencies

Install the following dependencies to use this component:

1npm install framer-motion clsx tailwind-merge

Installation

Run the following command in your terminal to add the component to your project:

1npx rankflow-ui@latest add cursor-tooltip-portal

Props Reference

PropTypeDefaultDescription
textstringundefinedDynamic contextual text to display inside the cursor-following floating portal.
defaultTextstring'Explore'Fallback text displayed when no specific hover target text is provided.
childrenReactNode-Interactive content or card grid that the cursor tracks across.
maxWidthnumber | string240Maximum width of the floating portal card before multiline truncation.
maxHeightnumber | string120Maximum height of the floating portal card.
maxLinesnumber3Maximum number of lines allowed before truncating with ellipsis.
stiffnessnumber220Spring stiffness for cursor tracking speed.
dampingnumber24Spring damping factor for smooth trailing delay.
massnumber0.6Mass of spring physics creating inertial delay.
offsetXnumber16Offset distance from cursor on X axis.
offsetYnumber16Offset distance from cursor on Y axis.
classNamestring''Additional CSS classes for the container wrapper.
cardClassNamestring''Additional CSS classes for the floating portal card.