saturation/uisaturation/ui
DocsComponentsBlocksPages
GitHub

Sections

IntroductionComponentsInstallationMCPTheming

Components

ComponentsAccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBeamBlur FadeBorder TrailBreadcrumbButtonButton GroupCalendar PickerCardChartCheckboxCollapsibleComboboxCommandComparison SliderContext MenuCredit CardData TableDate PickerDialogDropdown MenuEmoji PickerEmptyFieldFiltersFull CalendarGlow EffectInputInput GroupInput OTPItemKanbanKbdMenubarNavigation MenuNovel EditorPaginationParallaxProgressProgressive BlurRadio GroupRippleSelectSeparatorSheetSkeletonSliderSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Docs/Components/Tooltip

Tooltip

A popup that displays information related to an element on hover or focus.

Loading...

Installation

pnpm dlx shadcn@latest add https://ui.saturation.io/r/tooltip.json

Usage

import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@/components/ui/tooltip"
<TooltipProvider>
  <Tooltip>
    <TooltipTrigger>Hover me</TooltipTrigger>
    <TooltipContent>
      <p>Tooltip content</p>
    </TooltipContent>
  </Tooltip>
</TooltipProvider>

API Reference

TooltipProvider

Wraps your app to provide tooltip context.

PropTypeDefaultDescription
delayDurationnumber0The duration (ms) from when the mouse enters a tooltip trigger until the tooltip opens.
skipDelayDurationnumber300How much time a user has to enter another trigger without incurring a delay again.

Tooltip

The root component that manages tooltip state.

TooltipTrigger

The element that triggers the tooltip.

TooltipContent

The popup content of the tooltip.

PropTypeDefaultDescription
sideOffsetnumber4The distance in pixels from the trigger.
side"top" | "right" | "bottom" | "left""top"The side the tooltip appears on.
align"start" | "center" | "end""center"The alignment of the tooltip relative to the trigger.
PreviousTool Call CardNextTree

On This Page

  • Installation
  • Usage
  • API Reference
  • TooltipProvider
  • Tooltip
  • TooltipTrigger
  • TooltipContent