Variants and sizes

One style, k-tooltip. It opens 4 px below the trigger, centred, or above it when the trigger sits at the bottom of the screen.

States

  • Hidden: the rest state.
  • Shown: after 500 ms of hover, or at once on keyboard focus.
  • Hidden again: when the pointer leaves, focus moves on, the control is pressed, or Escape is pressed.
  • On phones there is no hover: a long press shows it, so the icon has to be clear without it.

Do and don’t

Do

  • Name the action in one to three words: "Notifications", "Add something".

  • Show it on keyboard focus as well as on hover.

Don’t

  • Put links, buttons or images in it.

  • Use it to explain a disabled control: a disabled button can't take focus. Say why next to it.

  • Repeat a label that is already visible.

What you provide

  • The text, the control it names, and the side it opens on.