Tooltip

Tooltips add additional context to interactive UI elements and appear on mouse hover or keyboard focus.

  • @primer/react@35.31.0
  • Draft
  • Not reviewed for accessibility

Import

import {Tooltip} from '@primer/react/drafts'

Examples

View in Storybook

Props

Tooltip

NameDefaultDescription
direction
s'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'

Sets where the tooltip renders in relation to the target.

text
string

The text to be displayed in the tooltip

type
description'label' | 'description'

The type of tooltip. label is used for labelling the element that triggers tooltip. description is used for describing or adding a suplementary information to the element that triggers the tooltip.

sx
SystemStyleObject