Skip to content

Popovers

Popovers are small overlays with a title and a few lines of content, opened by click, hover or focus. Use them for hints, definitions and details that do not deserve a whole dialog; the examples cover placements, triggers, disabled elements, custom styles and real interface spots.

1Basic popover

Click the button to toggle a popover with a title and content.

2Four directions

<code>data-ui-placement</code> chooses top, right, bottom or left.

3Dismiss on next click

<code>data-ui-trigger="focus"</code> closes the popover when the user clicks anywhere else. Use an <code>a</code> with <code>tabindex</code>.

4Hover trigger

<code>data-ui-trigger="hover focus"</code> opens on mouse hover and on keyboard focus.

5Disabled element

Disabled buttons do not fire events, so wrap them in a focusable span that carries the popover.

6In running text

A popover on an inline link explains a term without leaving the sentence.

Every order includes car rental at no extra cost, and you can cancel at any time.

7Help icon

A small round icon button next to a heading opens a hint.

Monthly budget

8Content only

Leave out <code>data-ui-title</code> for a popover without a header.

9Custom style

<code>data-ui-custom-class</code> adds a class to the popover so you can theme it.

10Status buttons

Small outline buttons whose popovers explain each status.

11Form label hint

An info icon in a label explains what to enter.

12In a table

Status badges in a table reveal details in a popover.

OrderTotalStatus
#PO-4508$300.44Approved
#PO-2544$439.39Overdue
#TX-3206$806.60Completed

13User card

Clicking an avatar shows the person's name, role and city.

14Long content

Popovers wrap longer text up to their maximum width.

15Auto placement

<code>data-ui-placement="auto"</code> lets the popover pick the side with the most room.

16Offset

<code>data-ui-offset="0,16"</code> moves the popover further from its trigger.

17Feature list

Info icons in a pricing list explain each feature.

Pro plan

  • Flexible dates
  • Best price guarantee
  • Best price guarantee
  • Flexible dates

18Toolbar

Popovers on buttons of a button group give each tool a short explanation.

19Escape a scrolling box

<code>data-ui-container="body"</code> renders the popover outside an <code>overflow</code> container so it is not cut off.

Local guides show you the places that never make it into guidebooks.

Free cancellation on most stays means you can book now and decide later.

20Input focus hint

A focus-triggered popover on an input lists the password rules while typing.