Park UI

Tooltip

A component for displaying contextual information on hover or focus.

Installation

Usage

Examples

Arrow

Use the showArrow prop to show an arrow on the tooltip.

Placement

Use the positioning.placement prop to change the position of the tooltip.

Offset

Use the positioning.offset prop to change the offset of the tooltip.

Delay

Use the openDelay and closeDelay prop to change the delay of the tooltip.

Custom Background

Use the --tooltip-bg CSS variable to change the background color of the tooltip.

Controlled

Use the open and onOpenChange prop to control the visibility of the tooltip.

Interactive

Use the interactive prop to keep the tooltip open when interacting with its content.

Disabled

Use the disabled prop to disable the tooltip. When disabled, the tooltip will not be shown.

With Avatar

Here's an example of how to use the Tooltip component with an Avatar component.

CB

With Switch

Here's an example of how to wrap Tooltip around a Switch component.

Props

Root