Skip to content

Tooltip

Props

API reference for Tooltip. For usage examples, see the React tab.

Tooltip.Root

NameTypeDefault
children (required)ReactNode
closeDelaynumber500

The delay time for the tooltip to close. See guidelines (opens in new tab).

defaultOpenboolean

Whether the overlay is open by default (uncontrolled).

delaynumber1500

The delay time for the tooltip to show up. See guidelines (opens in new tab).

isDisabledboolean

Whether the tooltip should be disabled, independent from the trigger.

isOpenboolean

Whether the overlay is open by default (controlled).

shouldCloseOnPressbooleantrue

Whether the tooltip should close when the trigger is pressed.

trigger"focus" | "hover"'hover'

By default, opens for both focus and hover. Can be made to open only for focus.

Tooltip.Content

NameTypeDefault
children (required)ReactNode
arrowBoundaryOffsetnumber0

The minimum distance the arrow's edge should be from the edge of the overlay element.

containerPaddingnumber12

The placement padding that should be applied between the element and its surrounding container.

crossOffsetnumber0

The additional offset applied along the cross axis between the element and its anchor element.

defaultOpenboolean

Whether the overlay is open by default (uncontrolled).

isEnteringboolean

Whether the tooltip is currently performing an entry animation.

isExitingboolean

Whether the tooltip is currently performing an exit animation.

isOpenboolean

Whether the element is rendered.

offsetnumber0

The additional offset applied along the main axis between the element and its anchor element.

placementPlacements

The placement of the tooltip with respect to the trigger.

shouldFlipbooleantrue

Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.

triggerRefRefObject<Element | null>

The ref for the element which the tooltip positions itself with respect to.

When used within a TooltipTrigger this is set automatically. It is only required when used standalone.