Feedback & overlays / Tooltip

Feedback & overlays

Tooltip

A short label beside a control with no visible text: the [data-tip] bubble as a component, wired to its trigger with aria-describedby.

import { EcoTooltip } from "vue-ecosphere"

Tooltip

Hover for 400ms or tab to the button. The icon button keeps its own aria-label: the tooltip describes, it never names. Escape hides it.

Copy link

Placement

The bubble sits against the trigger, not in a layer above the page: choose the side that clears the edge of a scrolling or clipped container.

AboveBelowBeforeAfter

Rich content

The content slot takes a little markup, such as the shortcut. Do not set the icon button's own tip as well.

Save draft ⌘S

EcoTooltip

NameTypeDefaultDescription
textstring—A few words, no full stop. The #content slot overrides it.
placement"top" | "bottom" | "start" | "end""top"Side of the trigger; start and end follow the writing direction.
disabledbooleanfalseNo bubble, and the trigger's aria-describedby is removed.
#defaultslot—One focusable trigger. Its first element gets aria-describedby pointing at the bubble.
#contentslot—Richer bubble text (a shortcut, a short emphasis). Nothing to click.