Build faster with Premium Chakra UI Components 💎

Learn more
Skip to Content
DocsPlaygroundGuidesBlog
Sponsor

Tooltip

Used to display additional information when a user hovers over an element.

SourceStorybookRecipeArk

Setup

If you don't already have the snippet, run the following command to add the tooltip snippet

npx @chakra-ui/cli snippet add tooltip

The snippet includes a closed component composition for the Tooltip component.

Usage

import { Tooltip } from "@/components/ui/tooltip"
<Tooltip content="...">
  <button />
</Tooltip>

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.

SA

With Checkbox

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

With MenuItem

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

With Switch

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

With Tabs

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

Manage your team members

Without Snippet

If you don't want to use the snippet, you can use the Tooltip component from the @chakra-ui/react package.

Props

Root

Previous

Toggle Tip

Next

ClientOnly