Skip to content

Tooltips via Popper.js? #952

Description

@edemaine

Bootstrap.js (since v4) uses Popper.js to display tooltips. One of the nice things about Popper.js is that has flags to automatically prevent tooltips from leaving the screen and to flip orientation of tooltips to do the same. I've grown to really like these, and now my bootstrap-slider tooltips stick out (literally) for not having this feature -- especially my left and right extreme tooltips tend to extend beyond the screen width (previously reported in #649).

It would be nice to be able to use Popper.js for slider tooltips. I see a few possibilities:

  1. Add Popper.js as a dependency; hopefully not an issue for people using Bootstrap, though there are Popper v1 vs. v2 issues. (I believe Bootstrap v4 uses Popper v1 while Bootstrap v5 uses Popper v2, and there are some compatibility issues.)
  2. Detect Popper.js and use it if so (similar to current jQuery dependency).
  3. Add callback/option(s) for custom tooltips that would allow someone to switch to Popper.js (or another system) themselves.

Do you have a sense of which of these options (if any) would be most preferable from your perspective?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions