HelpTribe.

Tooltip

Hover-activated tooltip for showing additional context. Supports four positioning options.

Installation

$ npx shadcn@latest add tooltip

Preview

Usage (React/TSX)

import { Tooltip } from "@/components/ui/tooltip"
import { Button } from "@/components/ui/button"

export default function ActionBar() {
  return (
    <Tooltip content="Save changes" side="bottom">
      <Button size="sm">Save</Button>
    </Tooltip>
  )
}

Props

PropTypeDefaultDescription
contentstringβ€”Text content of the tooltip.
side"top" | "bottom" | "left" | "right""top"Which side the tooltip appears on.
childrenReactElementβ€”The element that triggers the tooltip on hover.