iced-cube

Overlays

Tooltip

A short label that appears while the pointer rests on an element.

use iced_cube::tooltip;
use iced_cube::overlay::tooltip::Position;
API reference
Icon toolbar: Labels for icon-only buttons.Icon toolbar: Labels for icon-only buttons.
Static preview
Icon toolbar. Labels for icon-only buttons.

Usage

Use a tooltip to name an icon-only button or to add a short hint. Keep the label to a few words, and never put anything in it that people need to finish a task, because touch screens have no hover.

The bubble uses the primary colours, so it reads as dark on a light page and light on a dark one. It moves to stay inside the window when there is no room on the requested side.

Examples

Positions

The bubble on each side of its element.

Positions: The bubble on each side of its element.Positions: The bubble on each side of its element.
Static preview

API

ItemDescription
tooltip(content, label)Shows the label in a bubble while the pointer is over the content.
.position(Position)Top, Bottom, Left, Right or FollowCursor. Defaults to Top.
.delay(duration)How long the pointer has to rest on the element before the bubble appears. Defaults to zero, so it appears straight away.
style(tokens)The bubble style, for reuse in custom overlays.
Esc