Skip to component content

Show compact context hints for controls and actions on hover or keyboard focus with Bootstrap's native tooltip plugin.

Usage

Use data-bs-toggle="tooltip" for brief, optional hints attached to a control that already has a visible purpose. Attach the tooltip to a focusable trigger, keep the content short, and choose placement from the surrounding layout so the hint does not cover the thing it explains.

Initialize tooltips only on pages that use them; Bootstrap keeps them opt-in for performance and positions them with Popper. Use container="body" or another explicit container when the trigger sits inside complex layouts such as input groups, button groups, tables, or clipped containers.

Keep essential instructions visible outside the tooltip for touch and assistive technology users. Tooltips with empty titles do not show, disabled elements need a wrapper trigger, HTML content is sanitized, and tooltips should be hidden before their trigger is removed from the DOM.

Basic

Use a focusable trigger for one-line operational context without opening modals.

Tooltip
<a
  href="#!"
  class="tooltip-trigger"
  data-bs-toggle="tooltip"
  data-bs-placement="top"
  data-bs-title="Workspace status is visible from the project settings panel."
>
  Check sync status
</a>

Side

Choose tooltip_placement for compact command bars and density-sensitive tooltips.

Tooltip
<div class="d-flex flex-wrap gap-2">
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Preview opens above" data-bs-placement="top">Top</button>
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Preview opens to the right" data-bs-placement="right">Right</button>
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Preview opens below" data-bs-placement="bottom">Bottom</button>
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Preview opens to the left" data-bs-placement="left">Left</button>
</div>

With keyboard shortcut

Use compact shortcut badges in tooltip content and let Bootstrap sanitize the markup.

Tooltip
<button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Save draft <kbd>
  ⌘S
</kbd>
" data-bs-placement="top" data-bs-html="true">
<i class="lucide lucide-save" data-icon="inline-start" aria-hidden="true"></i>
Save draft
</button>

Disabled button

A disabled element never fires hover or focus events, so wrap it in a focusable <span> and attach the tooltip there, per Bootstrap's own guidance.

Tooltip
<span
    class="d-inline-block"
    role="button"
    tabindex="0"
    data-bs-toggle="tooltip"
    data-bs-title="This action is currently unavailable"
  >
  <button class="btn btn-outline-secondary" type="button" disabled>Archive</button>
</span>

RTL

Keep the same action context while previewing in RTL locales.

<div dir="rtl">
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="تتبع حالة المشروع من هذه البطاقة." data-bs-placement="top">حالة المشروع</button>
</div>
<div dir="rtl">
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="בדוק את סטטוס הפרויקט מאותה כרטיסייה." data-bs-placement="top">מצב הפרויקט</button>
</div>
<div dir="ltr">
  <button class="btn btn-outline-secondary" type="button" data-bs-toggle="tooltip" data-bs-title="Check project status from this card." data-bs-placement="top">Project status</button>
</div>

Component reference

Status
Accepted
Runtime
Bootstrap plugin
Markup
Bootstrap/native HTML
Reference

For Bootstrap's Tooltip plugin options, positioning, and accessibility notes, see the Bootstrap Tooltips documentation.

Settings

Theme
Choose how Moo UI looks on this device.
Sidebar
Choose how the sidebar sits on the page.
Theme Builder
Tune catalog tokens and chart colors for this browser.
Base color
Theme color
Chart color
Heading font
Body font
Radius
Direction
Choose the reading direction. RTL flips the layout live.
Reset

Restore the default appearance.