1. Overlays
  2. Popovers

Components

Tailwind CSS Popovers

A simple and compact dialog of an action.

Requires JS

When to use

Purpose of content

A simple popup menu to provide extra information or operations.

Image Description

Comparing with Tooltip, besides information Popover card can include a header and provide action elements like links and buttons.

Interactions

Popovers are typically dismissable, whether by click on other parts of the page or second clicking the popover target (depending on implementation), for that reason you can set up a popover to allow you to interact with other elements on the page while still being able to read it's content.

On top of that, since popovers will remain open when mousing out of their target you can add additional buttons or interactions within them:

Image Description

Conclusion

If you want to add any additional content, interactions, or content more than about a line; or if you need the content to remain open without the target being mousedover use a popover.

Although it should be noted due to accessibility problems, potential SEO issues, and lack of discovery of the popover, it's not recommended unless you absolutely need it.

Four directions

Four options are available: top, right, bottom, and left aligned.

Focus event

Use data-hs-tooltip-trigger="focus" for hover event.

Hover event

Use data-hs-tooltip-trigger="hover" for hover event.

With content

Example with content.