UIComponentsReact
A short label that appears when the reader hovers or focuses an element.
Built on the headless Tooltip.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/tooltip.jsonIt also adds utils. The app needs its setup first: Installation.
Usage
Tooltip holds TooltipTrigger and TooltipContent; the content brings its own portal, positioner and arrow, and takes side (top by default), sideOffset, align and alignOffset. Wrap a group of tooltips in TooltipProvider so that moving from one trigger to the next opens the next at once; its delay is 0 by default. In Angular the template writes baseTooltipPortal itself. Delays, the hover and focus logic and the accessible name come from the headless Tooltip. A tooltip is not reached by touch, so keep what it says available elsewhere.
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from '@/components/ui/tooltip'Examples
Side
One tooltip on each of the four sides.
Rendered by React 19.3.1
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Tooltip's API reference.