Skip to content

Tooltip

A short plain-text label on hover or focus, after a delay.

Base UI1.3 kB gzipSource Registry JSON

Tooltip playground

Props

side

Installation

npx shadcn@latest add https://sproutboat.com/ikada/r/tooltip.json

The CLI writes components/ikada/tooltip.tsx and merges the ikada theme into your CSS. Or take it from the package: import { TooltipProvider, Tooltip } from "@sproutboat/ikada";

Usage

import { TooltipProvider, Tooltip } from "@/components/ikada/tooltip";

<Tooltip content="Roll back to v47">
  <Button>Roll back</Button>
</Tooltip>

Examples

Default

Short plain text on hover or focus, after a delay. Anything interactive belongs in a Popover.

Sides

No delay

Skip the 450ms wait for a control that has no other label.

Props

TooltipProps
PropTypeDescription
contentrequiredReactNodeShort plain text. Anything interactive belongs in a Popover.
childrenrequiredReactElement<unknown, string | JSXElementConstructor<any>>The element that triggers the tooltip; it receives the trigger props.
side"top" | "bottom" | "start" | "end"Which side of the trigger the popup opens on. Flips when there is no room. Default `top`.
delaynumberMilliseconds before it opens on hover. Default from TooltipProvider (450).
defaultOpenbooleanWhether it starts open (uncontrolled).
classNamestringClasses merged onto the root element, after ikada's own.

Source: src/components/tooltip.tsx