Zum Hauptinhalt springen
VelinStyle v1.2.0
⌂ Startseite
  1. Erste Schritte
  2. Komponenten
  3. Tooltipps

Tooltipps 1.2.0

Leichte Texthinweise bei Hover/Fokus. Verfügbar als <velin-tooltip> Web Component oder die reine CSS- .velin-tooltip Klasse. English: Tooltipps

Reifegrad: Dokumentiert als stabil in VelinStyle 1.2.0. Design Intelligence (Plan / Review / Agent-Meta) ist separat und Beta / Foundation wo vermerkt.

Wann verwenden

Wann nicht

CSS-Tooltip

Umschließe Trigger und ein .velin-tooltip__content-Child. Optional platziert .velin-tooltip--bottom den Tipp darunter.

Hover über mich Hallo aus einem Tooltip! Unten Unten angezeigt
<span class="velin-tooltip" tabindex="0">
  Hover me
  <span class="velin-tooltip__content">Hello from a tooltip!</span>
</span>

<span class="velin-tooltip velin-tooltip--bottom" tabindex="0">
  Bottom
  <span class="velin-tooltip__content">Shown below</span>
</span>

Web Component

Nutze <velin-tooltip> mit content und optionalem placement (top default, bottom, start, end). Slotte den fokussierbaren Trigger.

<velin-tooltip content="Tooltip text" placement="top">
  <button type="button" class="velin-btn velin-btn--secondary">Hover / focus</button>
</velin-tooltip>

Flip-Verhalten

Flip is automatic on show for top/bottom when the tip would leave the viewport. There is no flip attribute — do not add one.

Barrierefreiheit

API

Attributes (<velin-tooltip>)

AttributTypBeschreibung
contentStringObserved — tip text (escaped). Use content, not text (that attribute is ignored).
placementStringObserved — top (default), bottom, start, end
visibleBooleanSet by the component while open (not a public show API)

Slots & Parts

NameArtBeschreibung
(default)SlotTrigger-Element
tipCSS partShadow-Tippfläche

No public methods or events. CSS pattern: .velin-tooltip, .velin-tooltip__content, .velin-tooltip--bottom.

Best Practices & Fallstricke

Legacy *-wc Tags

<velin-tooltip-wc> and <velin-stepper-wc> remain registered as deprecated aliases. Prefer <velin-tooltip> and <velin-stepper> in new markup.