Navigation & disclosure@neumorphism-ui/tooltip

Tooltip

Built on Base UI Tooltip by composing Provider, Root, Trigger, Portal, Positioner, and Popup. The default provider delay is 250ms, and the popup automatically avoids collisions around the trigger.

@neumorphism-ui/tooltip
Registry JSON

Preview

Hover the button or move focus to it.

Installation

Installation: tooltipnpx shadcn@latest add @neumorphism-ui/tooltip

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Usage: Installationnpx shadcn@latest add @neumorphism-ui/button @neumorphism-ui/tooltip

Import

Tooltip import code
import { Button } from "@/components/ui/button"
import {
  Tooltip,
  TooltipContent,
  TooltipProvider,
  TooltipTrigger,
} from "@/components/ui/tooltip"

Example

Tooltip usage code
<TooltipProvider>
  <Tooltip>
    <TooltipTrigger
      render={<Button size="icon" aria-label="Open settings" />}
    >
      ⚙
    </TooltipTrigger>
    <TooltipContent side="top">
      Settings
    </TooltipContent>
  </Tooltip>
</TooltipProvider>

API Reference

ComponentPropTypeDefaultDescription
TooltipProviderdelaynumber250The delay in milliseconds before opening the tooltip after pointer hover.
Tooltipopen / defaultOpenbooleanfalseThe controlled open state or initial uncontrolled open state.
TooltiponOpenChange(open: boolean) => void—Called when the open state changes.
TooltipTriggerrenderReactElement | (props, state) => ReactElement—Composes tooltip trigger behavior onto a button or link.
TooltipContentside / align"top" | "right" | "bottom" | "left" / "start" | "center" | "end""top" / "center"Positions the popup relative to the trigger.
TooltipContentsideOffsetnumber8The distance between the trigger and popup.

Accessibility

  • 01

    Tooltip does not replace the accessible name of its trigger, so icon buttons still need an aria-label.

  • 02

    Keep the content brief and supplementary; do not place essential instructions or error messages only in Tooltip.

  • 03

    Base UI opens Tooltip on keyboard focus as well as hover and closes it with Escape.