Skip to content
Back to skills

Tooltip

ASecurity

Hover tooltip with Floating UI positioning, animated entrance/exit, enter/leave delays, and follow-cursor mode. Global state ensures only one tooltip is visible at a time.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
developmenttypescriptreactnode

Works with

  • cursor
  • cli

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add reaviz/skills --skill tooltip --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tooltip?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tooltip
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reaviz-tooltip/badge)](https://www.skillsdirectory.com/skills/reaviz-tooltip)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Tooltip

Hover tooltip with Floating UI positioning, animated entrance/exit, enter/leave delays, and follow-cursor mode. Global state ensures only one tooltip is visible at a time.

## Import

```tsx
import { Tooltip } from 'reablocks';
```

## Tooltip Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `content` | `ReactNode \| (() => ReactNode)` | — | Tooltip content |
| `children` | `ReactNode` | — | Trigger element |
| `placement` | `Placement` | `'top'` | Floating UI placement |
| `trigger` | `TriggerTypes \| TriggerTypes[]` | `'hover'` | Trigger type(s) |
| `enterDelay` | `number` | `0` | Delay before showing (ms) |
| `leaveDelay` | `number` | `200` | Delay before hiding (ms) |
| `visible` | `boolean` | `false` | External visibility control |
| `disabled` | `boolean` | `false` | Disable the tooltip |
| `followCursor` | `boolean` | `false` | Follow mouse cursor |
| `closeOnClick` | `boolean` | `false` | Close on content click |
| `closeOnBodyClick` | `boolean` | `true` | Close on outside click |
| `closeOnEscape` | `boolean` | `true` | Close on Escape key |
| `animated` | `boolean` | `true` | *(deprecated)* Enable animation |
| `animation` | `MotionNodeAnimationOptions` | — | Custom animation config |
| `className` | `string` | — | Tooltip content CSS classes |
| `triggerClassName` | `string` | — | Trigger wrapper CSS classes |
| `reference` | `HTMLElement \| ReferenceObject` | — | External reference element |
| `modifiers` | `Modifiers` | — | Floating UI middleware |
| `onOpen` | `() => void` | — | Open callback |
| `onClose` | `() => void` | — | Close callback |
| `theme` | `TooltipTheme` | — | Per-instance theme override |

## Basic Usage

```tsx
<Tooltip content="Helpful tip">
  <Button>Hover me</Button>
</Tooltip>
```

## Placement

```tsx
<Tooltip content="Top" placement="top">...</Tooltip>
<Tooltip content="Bottom" placement="bottom">...</Tooltip>
<Tooltip content="Left" placement="left">...</Tooltip>
<Tooltip content="Right" placement="right">...</Tooltip>
```

## With Delay

```tsx
<Tooltip content="Delayed tooltip" enterDelay={500} leaveDelay={100}>
  <span>Hover me</span>
</Tooltip>
```

## Follow Cursor

```tsx
<Tooltip content="Following..." followCursor>
  <div className="w-64 h-32 bg-gray-200">Move mouse here</div>
</Tooltip>
```

## Rich Content

```tsx
<Tooltip content={() => (
  <div>
    <strong>Title</strong>
    <p>Detailed description</p>
  </div>
)}>
  <span>Hover for details</span>
</Tooltip>
```

## TooltipTheme Interface

```typescript
interface TooltipTheme {
  base: string;           // Tooltip styles (whitespace, text-center, padding, rounded, bg, text)
  disablePointer: string; // Pointer-events-none (applied to portal when pointerEvents='none')
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.