Brand Guide

Components

Tooltip

A short label that appears beside a control while it is hovered or focused.

Default

Hover the button, or tab to it.

Sides

A tooltip opens above its trigger unless told otherwise.

Alignment

align lines the tooltip up with the start, centre or end of its trigger. The arrow stays on the trigger’s centre.

Offset

A tooltip already stands off its trigger by the size of its arrow. sideOffset adds to that.

On text

The trigger is a button, so it can be reached with the keyboard wherever it sits.

Notice period:

Best practices

  • A tooltip opens the moment its trigger is hovered or focused, with no delay. Each Tooltip brings its own provider, so it needs nothing above it in the tree.
  • side is top, bottom, left or right. The arrow is drawn for those four only.
  • Near the edge of the screen a tooltip flips to the opposite side, or slides along its trigger and keeps its alignment. The arrow keeps pointing at the centre of the trigger, and hides if it cannot reach it.
  • To lift a tooltip above another layer, pass a z-index as positionerClassName, not in className. The positioner is what stacks.
  • A tooltip on an icon-only button does not replace the button's aria-label.