Hone UI
Components

Tooltip

A short label shown on hover or keyboard focus.

Tooltip shows a short label next to an element when the pointer rests on it or keyboard focus reaches it.

import Tooltip from '@hone-ui/react/Tooltip';

Examples

<Tooltip title="Delete">
  <Button>Hover or focus me</Button>
</Tooltip>

Props

PropTypeDefaultDescription
titleReactNodeThe label. Empty shows nothing.
childrenelementOne focusable element.
arrowbooleanfalseDraws an arrow.
placement'bottom', 'top-start', … , 'right''bottom'Where it sits. It flips when there is no room.
open, onOpen, onCloseControlled mode.
describeChildbooleanfalseDescribes the child instead of naming it.
enterDelay, leaveDelaynumber100, 0Milliseconds before opening and closing.
disableHoverListenerbooleanfalseOpens on keyboard focus only.
disableInteractivebooleanfalseCloses as the pointer leaves the child. By default the pointer can move onto the tooltip and keep it open (after a 100 ms grace, or leaveDelay if longer).
slotProps.tooltip, slotProps.arrowobjectProps for the bubble and the arrow.
sx, className, style, refGo to the bubble.

Notes

  • followCursor, disableFocusListener, disableTouchListener, PopperProps and TransitionComponent are not supported.
  • Touch does not open a tooltip, so don't put information only there.

Accessibility

Without describeChild, a text title becomes the child's aria-label. The bubble has role="tooltip", and Escape closes it.

On this page