MeDo

KI-Tooltip-Generator.

Beschreiben Sie den Hinweis, den Sie brauchen, und MeDo generiert das gesamte Verhalten — Öffnungs- und Schließverzögerung, Umklappen weg von Viewport-Rändern, einen Pfeil, der stets auf den Trigger zeigt, Auslösen per Tastaturfokus und die aria-describedby-Verknüpfung.

Tooltip
Tooltip

Der Tooltip ist die eine Komponente, die ein Drittel Ihrer Nutzer nie sehen wird

Auf einem Touchscreen gibt es kein Hover. Es existiert keine Handy-Gestik, die zuverlässig bedeutet „zeige mir die Beschreibung, ohne dieses Element auszulösen" — jeder Tooltip ist damit für einen großen Teil Ihres Traffics unsichtbar. Diese eine Tatsache klärt die meisten Tooltip-Diskussionen, bevor sie beginnen: Ein Tooltip darf nur Informationen tragen, die der Nutzer nicht braucht. Feldanforderungen, Fehlermeldungen, Preishinweise und die Bedeutung eines Buttons mit reinem Symbol müssen sichtbar sein oder in einem zugänglichen Namen stehen. Betrachten Sie den Tooltip als Verfeinerung einer Oberfläche, die auch ohne ihn funktioniert, und die Barrierefreiheitsfragen beantworten sich fast von selbst.

6 Vorlagen

Tooltip-Vorlagen, die Sie generieren können

Jede Vorlage ist ein echter Prompt, kein Screenshot. Kopieren Sie ihn in einen KI-Editor oder führen Sie ihn in MeDo aus und erhalten Sie React- und Tailwind-Code zurück.

BasicLabel Hint

Dark Panel Hint on Hover and Focus

The default tooltip: one line of plain text, dark panel, arrow, delays in both directions. Reach for it when a control is already named and you only want to add a detail a mouse user might appreciate.

Create a tooltip component that wraps a single trigger child and renders a short plain-text hint on pointer enter and on focus-visible. Use a dark slate panel with 13px white text, 6px vertical and 10px horizontal padding, a 6px radius, a 240px max width and an 8px offset from the trigger, plus a 6px arrow aimed at the trigger. Open after a 300ms delay and close after 100ms so the pointer can cross the gap without the panel vanishing. Dismiss on Escape, on blur and on scroll. Give the panel role="tooltip" and link it to the trigger with aria-describedby only while it is open, rather than leaving hidden markup in the tree. Fade and translate 4px on entry, and drop the transition entirely under prefers-reduced-motion.

In MeDo testen
Icon-onlyIcon Button

Tooltip as the Only Label a Control Has

When the icon is the whole button, the tooltip text is the accessible name — not a description. Getting that distinction wrong is why so many toolbars announce the same word twice.

Create a tooltip for an icon-only button where the tooltip text is the only name the control has. Put that string in aria-label on the button and do not also set aria-describedby, so the same words are not announced twice. The visible panel exists for sighted pointer users: dark surface, 12px text, a single line that does not wrap under 200px. Open on hover after a 400ms delay but open immediately on focus-visible, since a keyboard user has already committed to the control. Close on Escape, on blur and on pointer leave. Keep the button hit area at least 44px even when the glyph is 20px, and skip rendering the panel entirely when a coarse pointer is detected.

In MeDo testen
CollisionAuto Flip

Edge-Aware Placement With a Tracking Arrow

Handles the case a fixed side always breaks: a trigger near the top of a scroll container or the right edge of the viewport. The arrow has to re-anchor after the flip or it points at nothing.

Create a tooltip with collision-aware placement: a preferred side prop of top, bottom, left or right, an explicit fallback order, and shifting along the cross axis when the panel would overflow the viewport or the nearest scrolling ancestor. Add a 6px arrow that re-anchors to the trigger centre after any flip or shift, clamped so it never slides past the panel corner radius. Recompute position on scroll and resize behind a requestAnimationFrame throttle, and close rather than reposition once the trigger leaves the visible area. Keep the aria-describedby relationship stable across repositioning so the description is not re-announced. Use role="tooltip" and plain text content with no interactive children.

In MeDo testen
ToolbarGroup Skip

Shared Delay Across a Button Row

One provider, one timer. Once the first tooltip in a toolbar has opened, moving along the row should switch content instantly instead of making the user wait 300ms per button.

Create a tooltip provider that shares open state across a group of triggers in a toolbar. The first tooltip in the group waits the full 300ms open delay; while any tooltip in the group is open, moving to a sibling trigger swaps the content with no delay and no exit animation, so the panel appears to slide along the row. Leaving the group entirely closes after a 150ms grace period. Reuse a single positioned panel element rather than mounting one per trigger, and update its aria-describedby target as the active trigger changes. Escape closes the group and returns focus behaviour to normal. Under prefers-reduced-motion, replace the slide with an instant content swap.

In MeDo testen
Multi-lineRich Hint

Two-Line Tooltip With a Keyboard Shortcut

A label line plus a monospace shortcut hint on the right. Still passive, still text-only — the moment you want a link in here, you want a popover instead.

Create a tooltip that renders a label line plus a secondary line, with an optional keyboard shortcut rendered as a small monospace chip aligned to the right of the label. Cap the panel at 260px, allow the description to wrap to two lines, and keep line-height at 1.4 so the two lines read as one block. Content stays non-interactive: no links, no buttons, no selectable code — if the user needs to click inside, use a popover. Announce the whole panel as one description via aria-describedby so the shortcut is read as part of the sentence rather than as a separate node. Open after 300ms, close after 100ms, dismiss on Escape and blur.

In MeDo testen
OverflowTruncation

Tooltip Only When the Text Is Clipped

Table cells and file names truncate with an ellipsis; a tooltip that repeats already-visible text is noise. Measure the element and only attach the tooltip when scrollWidth exceeds clientWidth.

Create a conditional tooltip for truncated text: compare scrollWidth against clientWidth on the target element and only register hover and focus handlers when the text is actually clipped, so a fully visible cell never shows a tooltip repeating itself. Re-measure on resize and whenever the text content changes, using a ResizeObserver rather than a window listener. When active, show the full string in a dark panel capped at 320px with wrapping enabled, positioned below the cell to avoid covering the row header. Make the truncated element focusable with tabindex="0" only while the tooltip is registered, so keyboard users can reach it without collecting empty tab stops across the whole table.

In MeDo testen

So passen Sie Ihre Tooltip an

Öffnungs- und Schließverzögerung getrennt festlegen

Eine gemeinsame Verzögerung ist in beide Richtungen falsch. Rund 300ms vor dem Öffnen verhindern, dass Tooltips aufblitzen, während der Zeiger eine Symbolleiste überstreicht, während eine kurze Schließverzögerung von 100ms dem Zeiger den Weg vom Trigger zum Tooltip lässt, ohne dass das Panel mitten in der Bewegung verschwindet.

Fordern Sie Kollisionserkennung, keine feste Seite

Ein fest oben platzierter Tooltip wird am oberen Viewport-Rand oder am Rand eines Scroll-Containers abgeschnitten. Geben Sie eine bevorzugte Seite plus Alternativen an, damit die Komponente selbstständig umklappt und verschiebt, und verlangen Sie, dass der Pfeil danach weiter auf den Trigger zeigt.

Fokus als Auslöser verlangen, nicht nur Hover

Reagiert der Tooltip nur auf die Maus, gehen Tastaturnutzer leer aus. Verlangen Sie Öffnen bei focus-visible und Schließen bei Escape und blur — genau das macht ihn auch für Menschen mit Schaltergeräten oder Screenreadern nutzbar.

Inhalt passiv und rein textlich halten

Sobald ein Tooltip einen Link, einen Button oder kopierbaren Text enthält, braucht er einen Weg, erreicht und offen gehalten zu werden — und ist kein Tooltip mehr. Legen Sie fest, dass der Inhalt reiner, nicht interaktiver Text ist, und greifen Sie zum Popover, wenn etwas darin klickbar sein soll.

Wer die Tooltip-Komponente nutzt

Dashboard oder Admin-Tool

Symbol-Buttons in der Werkzeugleiste mit einem echten zugänglichen Namen plus einem Tooltip, der die Bezeichnung für sehende Maus-Nutzer wiederholt — die Öffnungsverzögerung entfällt, wenn der Zeiger zwischen benachbarten Buttons wechselt.

SaaS-Produkt

Ein Hinweis an der Diagrammlegende, der erklärt, wie eine Metrik berechnet wird, nahe der Panel-Oberkante nach unten umklappt und beim Scrollen verschwindet, damit er nie losgelöst von der beschriebenen Stelle schwebt.

Online-Shop

Abkürzungen in der Größentabelle und Versand-Badge-Symbole werden bei Hover erläutert, wobei dieselbe Information zusätzlich im sichtbaren Text der Produktseite steht, weil Handy-Käufer das Hover nie auslösen.

Entwicklerdokumentation

Inline-Code-Tokens und Abkürzungen zeigen bei Hover oder Fokus eine einzeilige Typsignatur, begrenzt auf eine schmale maximale Breite, damit das Panel niemals das erklärte Codebeispiel verdeckt.

Tooltip-Muster für verschiedene Websites

Dieselbe tooltip-Komponente, abgestimmt auf die Art der Website, auf der sie läuft.

01 / 06

Dashboard and Admin Tools

Dense toolbars are where tooltips earn their keep and where a per-trigger delay is most annoying. Use one shared provider so moving along a row of icon buttons swaps the label instantly. The tooltip still cannot be the only place the label exists — every icon button needs a real accessible name regardless.

Tooltip-Stile und -Varianten

Wählen Sie die Variante, die zum Rest der Seite passt, und generieren Sie sie.

01 / 06

Dark Panel Tooltip

A dark slate surface with white text is the default for a reason: it reads as an overlay rather than as page content, so users do not mistake it for a permanent part of the layout. Keep the panel opaque — a translucent tooltip over a chart becomes unreadable exactly where it is needed.

Tooltip in React, Next.js, Vue und Svelte

React, Next.js, Vue 3, SvelteKit, Astro oder reines HTML — dieselbe tooltip, sechs Wege zur Einbindung.

01 / 06

React Tooltip

Positioning needs real DOM measurement, so this is a client component with refs on both trigger and panel. Portal the panel to document.body — a tooltip inside a container with overflow: hidden will be clipped no matter how correct the coordinates are.

src/components/Tooltip.tsx

export function Tooltip({ label, children }) {
  const [open, setOpen] = useState(false)
  const id = useId()

  return (
    <span
      onPointerEnter={() => setOpen(true)}
      onPointerLeave={() => setOpen(false)}
    >
      {cloneElement(children, { 'aria-describedby': open ? id : undefined })}
      {open && createPortal(<Panel id={id}>{label}</Panel>, document.body)}
    </span>
  )
}

So fügen Sie Ihre Tooltip einem Projekt hinzu

Vier Schritte, von der Auswahl einer tooltip-Vorlage bis zum Einsatz in der Produktion.

01~30s

Pick a Tooltip Pattern

Choose by what the trigger already tells the user: a label hint for a named control, the icon-only variant when the tooltip text is the accessible name, or the truncation variant for table cells.

02~10s

Copy the Prompt

Take it into MeDo, Lovable, Bolt, v0 or Cursor, and set the open and close delays before you run it. Those two numbers are what separates a helpful hint from a panel that flickers across a toolbar.

03~1min

Generate and Refine

You get React + Tailwind back with a live preview. Follow up in plain English — "flip below near the top edge", "open instantly on focus", "skip the delay between toolbar buttons" — rather than editing coordinate math by hand.

04~2min

Wire the Triggers and Test the Keyboard

Portal the panel out of any overflow-hidden ancestor, then tab to each trigger and press Escape. If the hint only appears on hover, or Escape does not close it, the component is not shippable yet.

Häufige Fragen zu Tooltip

Wie generiere ich eine Tooltip-Komponente mit KI?

Beschreiben Sie Trigger, Platzierung und Timing in einem Prompt — zum Beispiel „ein dunkler Tooltip über dem Trigger, 300ms Öffnungsverzögerung, klappt am Viewport-Rand um, öffnet auch bei Fokus". MeDo generiert Positionierungslogik, Pfeil, Verzögerungen und aria-describedby-Verknüpfung gemeinsam, sodass das Verhalten vollständig ist und nicht nur ein gestyltes absolut positioniertes div.

Was ist der Unterschied zwischen Tooltip und Popover?

Ein Tooltip ist passiv: Er zeigt eine kurze Textbeschreibung des Elements, auf das Sie zeigen, schließt sich, sobald Sie weggehen, und enthält nichts Klickbares. Ein Popover ist interaktiv: Es öffnet sich per Klick, bleibt offen, enthält Links, Buttons oder Formularfelder und verwaltet den Fokus. Wenn Sie einen Button im Tooltip haben wollen, wollten Sie ein Popover.

Sollte ein Tooltip aria-describedby oder aria-label verwenden?

Verwenden Sie aria-describedby, wenn der Trigger bereits einen sichtbaren oder zugänglichen Namen hat und der Tooltip ergänzendes Detail liefert, denn eine Beschreibung wird nach dem Namen vorgelesen. Verwenden Sie aria-label, wenn der Tooltip-Text der einzige Name des Elements ist, etwa bei einem Button mit reinem Symbol — und lassen Sie aria-describedby dann weg, damit derselbe Text nicht zweimal angekündigt wird.

Funktionieren Tooltips auf Touch-Geräten?

Nicht zuverlässig. Touchscreens haben keinen Hover-Zustand, und langes Drücken ist bereits von Textauswahl und Kontextmenüs belegt, sodass jedes Tooltip-bei-Tap-Muster gegen die Plattform arbeitet. Gehen Sie davon aus, dass Handy- und Tablet-Nutzer ihn nie sehen, und halten Sie alles Wesentliche in sichtbarem Text oder in einem zugänglichen Namen.

Wie lang sollte die Verzögerung sein, bevor ein Tooltip öffnet?

Etwa 200 bis 500ms funktionieren gut, 300ms ist ein sicherer Standard. Die Verzögerung verhindert, dass Tooltips flackern, während der Zeiger eine Reihe von Bedienelementen auf dem Weg woandershin überquert. Kombinieren Sie sie mit einer viel kürzeren Schließverzögerung von etwa 100ms, damit das Panel nicht verschwindet, während sich der Zeiger darauf zubewegt.

Muss ein Tooltip per Tastatur schließbar sein?

Ja. Die WCAG verlangt, dass Inhalte, die bei Hover oder Fokus erscheinen, ohne Bewegen von Zeiger oder Fokus geschlossen werden können — praktisch heißt das: Escape schließt ihn. Er muss außerdem lange genug sichtbar bleiben, um gelesen zu werden, und mit dem Zeiger überfahrbar sein. Erwähnen Sie Tastaturunterstützung in Ihrem Prompt, und MeDo verdrahtet Escape, blur und das Hover-Bridge-Verhalten.