Skip to content
Dumb UI

Search Dumb UI

Jump to a page or component, or switch the style

Search Dumb UI

Jump to a page or component, or switch the style

Tooltip

A short label on hover or focus, with an optional keyboard shortcut.

OverlaysRadix TooltipDumb extras
Props
$ pnpm dlx shadcn@latest add @dumb/tooltip

Needs the @dumb registry in components.json and the style tokens. See Installation.

import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
<Tooltip>
  <TooltipTrigger asChild>
    <Button size="icon" variant="ghost" aria-label="Search">
      <MagnifyingGlassIcon />
    </Button>
  </TooltipTrigger>
  <TooltipContent shortcut="⌘K">Search</TooltipContent>
</Tooltip>

Toolbar with shortcuts

shortcut renders a kbd hint after the label.

API reference

Props marked “extra” are Dumb UI additions. Everything else matches shadcn/ui.

TooltipContent

PropTypeDefault
shortcutextraReactNode

Keyboard shortcut shown after the label.

-
side"top" | "right" | "bottom" | "left"

Preferred side.

"top"
Tab
Focus on the trigger opens the tooltip.
Esc
Closes it.