Tooltip
Help that waits a moment on hover and describes its control.
Features
- Waits 450 ms on hover, appears at once on focus.
Use it for
- Icon buttons.
Installation
- Get runets.
git clone https://github.com/ziyam-khan/runets - Copy these files into your project, keeping their folders.
- Install what they use.
pnpm add react @base-ui/react motion lucide-react - Load the styles once. Bring your own base tokens, or use runets’ default theme.
import 'runets/styles/theme.css' import 'runets/styles/kit.css'
Usage
import { Tooltip } from 'runets'
<Tooltip label="Search (⌘K)"><IconButton label="Search"><Search /></IconButton></Tooltip>API
| Prop | Type | What it does |
|---|---|---|
label | string | The help. |
Accessibility
- Describes its control; never holds the only name of a control.
Source
The code is in src/kit/overlays.tsx in runets, MIT licensed.