StellarUI

<stellar-tooltip>

anchored tooltip for brief non-interactive help text on focusable controls.

Properties

Component
Example

Preview

I'm a tooltip

Markup

Copy
<button
  id="tooltip-demo-anchor"
  type="button"
>
  Hover or focus me
</button>
<stellar-tooltip for="tooltip-demo-anchor">I'm a tooltip</stellar-tooltip>

API

Complete props, events, slots, and implementation notes for the shipped tooltip.

Props

PropTypeDefaultNotes
forstring''
openbooleanfalse
placementauto | top | top-start | top-end | bottom | bottom-start | bottom-end | right | right-start | right-end | left | left-start | left-endauto
open-delaynumber50
close-delaynumber100
manualbooleanfalse
without-arrowbooleanfalse

Events

EventSourceNotes
before-openstellar-tooltipCancelable event emitted right before the tooltip opens.
openstellar-tooltipEmitted after the tooltip opens.
before-closestellar-tooltipCancelable event emitted right before the tooltip closes.
closestellar-tooltipEmitted after the tooltip closes.

Slots

SlotNotes
defaultTooltip body content. Keep it non-interactive so the component stays a tooltip instead of drifting into popover behavior.

Notes

  • The public tag is `stellar-tooltip`, anchored to another focusable element by its `for` id.
  • The docs preview keeps that anchor id stable on purpose. `for` is a real prop, but live-changing it makes the preview race the anchor update instead of demonstrating tooltip behavior.
  • The default behavior is automatic hover and focus opening: pointer up and blur close it, only one non-manual tooltip stays open at a time, and `placement` defaults to `auto`. The gap and cross-axis nudging props were intentionally removed to keep the API small.
  • Use the boolean `manual` prop when another component or app state owns visibility through the `open` prop.
  • Tooltip content is authored children, not a `label` prop, so docs keep the anchor text and tooltip text in `Example Properties` instead of pretending they are element props.
  • Do not put interactive controls inside the tooltip. The component follows tooltip semantics, not popover or dialog semantics.