Snippets Image

Bootstrap 5 Tooltip with Image and Content

Inline place names that reveal a popover with a photo, title and short description on hover, tap or keyboard focus.

Bootstrap 5 No jQuery Dec 2019 3.9K views

<section class="wdw-stage tt-stage">
  <div class="container" style="max-width:720px">
    <div class="wdw-card p-4 p-md-5">
      <span class="wdw-eyebrow mb-2">Weekend guide</span>
      <h2 class="wdw-heading h2 mb-3">A slow Saturday in the hills</h2>
      <p class="small wdw-muted mb-4 d-flex align-items-center gap-2">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8v4M12 16h.01"/></svg>
        Hover, tap or focus the underlined places for a preview.
      </p>
      <p class="fs-5 lh-lg mb-3"><strong class="text-body-emphasis">Morning.</strong> Take the twenty minute trail up to <button type="button" class="tt-trigger" data-tt-title="Lake Verde" data-tt-text="A twenty minute trail from the car park, calm water and few crowds." data-tt-img="https://images.unsplash.com/photo-1501594907352-04cda38ebc29?auto=format&fit=crop&w=600&q=75" data-tt-alt="Calm mountain lake at sunrise">Lake Verde</button> before the day warms up.</p>
      <p class="fs-5 lh-lg mb-3"><strong class="text-body-emphasis">Afternoon.</strong> Head back down for dessert at <button type="button" class="tt-trigger" data-tt-title="Gelateria Nonna" data-tt-text="Small-batch gelato and chocolate sundaes, open daily until 10pm." data-tt-img="https://images.unsplash.com/photo-1563805042-7684c019e1cb?auto=format&fit=crop&w=600&q=75" data-tt-alt="Chocolate dessert served in a glass">Gelateria Nonna</button> and rest your legs.</p>
      <p class="fs-5 lh-lg mb-0"><strong class="text-body-emphasis">Evening.</strong> Finish at the ridge for <button type="button" class="tt-trigger" data-tt-title="Ridge sunset point" data-tt-text="Best light is about an hour before sunset. Bring a jacket." data-tt-img="https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=600&q=75" data-tt-alt="Snowy mountain peaks at dusk">golden hour</button>.</p>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.