Skip to main content

Tooltips & popovers

Bootstrap 5.3 overlays: Tooltip and Popover with data-bs-* attributes, data-bs-custom-class for themed variants, and data-bs-theme on the document for light/dark. Tooltips/popovers are moved to body by default so they follow the page theme, not a nested dark strip.

Floating UI + Popper

Hover, focus, or click triggers; HTML content where appropriate; and accent styles scoped with custom classes. Toggle the navbar theme to verify contrast on arrows, headers, and glass surfaces.

Placements · eight directions

Side positions use Popper’s left and right (Bootstrap’s AttachmentMap in v5.3 does not map start/end, so those strings would not resolve to opposite sides).

Semantic color skins

data-bs-custom-class maps to .tp-c-* in styles.css.

HTML body · wide max-width

Triggers

Delay · disabled pattern

Manual API

Programmatic show/hide on the badge target.

Target

Icons · links · badges · field

· Pro ·

Focus the input to see a right-placed tooltip.

Overflow & container

When a parent uses overflow: hidden, pass data-bs-container="body" so the overlay isn’t clipped.

Directions · click to toggle

Dismiss on focus loss

Hover + focus

Offset · auto-close

Accent headers · custom class

Rich HTML · glass surface

Disabled control

Long body copy

Same document theme for overlays

These controls sit on a dark surface, but tooltips/popovers are still attached to body under the root data-bs-theme. Toggle the navbar sun/moon to restyle them.