Dinachi

Tooltip

A floating label that appears on hover or focus to provide supplementary information about an element.

View Source

#Installation

npx @dinachi/cli@latest add tooltip

#Usage

tsx
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'

#Examples

#API Reference

PropTypeDefaultDescription
variant'default' | 'inverse''default'The visual style variant of the tooltip
openDelaynumber700The delay in milliseconds before the tooltip opens
closeDelaynumber300The delay in milliseconds before the tooltip closes
side'top' | 'right' | 'bottom' | 'left''top'The preferred side of the trigger to render the tooltip
sideOffsetnumber4The distance in pixels from the trigger
showArrowbooleantrueWhether to show the tooltip arrow pointing to the trigger
TooltipTrigger.closeOnClickbooleantrueWhether clicking the trigger dismisses the tooltip. Set to false to keep the tooltip open on click.