文字提示 / Tooltip

New

悬停或聚焦触发的文字提示,进出场带模糊过渡与弹簧生成动画;另有 Morph 变体,一块共享气泡在相邻触发器之间滑移变形。

标准文字提示

tooltip.tsx

单触发器文字提示:进出场模糊过渡、弹簧生成,支持四个方向定位。

Hover or focus each button. Content fades and un-blurs in.

安装

$ bunx --bun shadcn add @uilab/tooltip

API 参考

content
ReactNode
side?
"bottom" | "left" | "right" | "top"
top
delay?
number

Delay before showing (ms). Default 120.

120
className?
string
wrapperClassName?
string

Classes for the outer wrapper span. Use to fix baseline / fill parent.

变形文字提示

tooltip-morph.tsx

MorphTooltipGroup 让一组触发器共享同一块气泡:首次悬停弹簧入场,移到相邻触发器时不退场,而是滑移并改变宽度,文字带模糊交叉淡变。

Hover across the toolbar

安装

$ bunx --bun shadcn add @uilab/tooltip-morph

API 参考

MorphTooltipGroup

side?
"bottom" | "top"

Which side of the triggers the shared bubble grows on. Default "top".

top
delay?
number

Delay before the bubble first appears, in ms. Default 120 (matches Tooltip).

120
className?
string

MorphTooltip

content
ReactNode
className?
string

Classes applied to the shared bubble while this trigger is the active one.

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.