Tooltip

Compact and detailed labels on hover and focus.

Installation

Add this item from the registry, or import it from the package after installing Default File UI.

Registry path

itsvigneshv/default-file-ui/tooltip

Package import

import { Tooltip, TooltipContent, TooltipTrigger } from "@default-file/ui/components/df-tooltip"

Compact

Pill label for short, single-line hints.

Detailed: single line

Square-ish panel that stays on one line.

Detailed: wrapping

Square-ish panel that wraps copy across multiple lines.

Without arrow

Hide the pointer with arrow={false}.

Sides

Corner placements (top left, top right, bottom left, bottom right) plus centred top, right, bottom, and left.

Properties

Compact or detailed labels on hover and focus. Compose Tooltip, TooltipTrigger, and TooltipContent.

Tooltip

PropTypeDefaultNotes
variant"compact" | "detailed""compact"Content density and typography.
openbooleanControlled open state.
defaultOpenbooleanUncontrolled initial open state.
onOpenChange(open: boolean) => voidCalled when open state changes.
delayDurationnumber200Hover delay in milliseconds before showing.

TooltipTrigger

PropTypeDefaultNotes
renderReactElementHost element to attach tooltip behavior to.
childrenReactNodeTrigger content when not using render.
…button attributesButtonHTMLAttributesApplied when rendering the default button host.

TooltipContent

PropTypeDefaultNotes
side"top" | "bottom" | "left" | "right""top"Preferred placement side.
align"start" | "center" | "end""center"Alignment along the side.
sideOffsetnumber14Gap between trigger and content.
alignOffsetnumber0Shift along the alignment axis.
wrapbooleanDetailed only: wrap text within max width.
arrowbooleantrueShow the pointing arrow.
childrenReactNodeTooltip label or detailed body.