On this page

Popover

When to use a popover, what to use instead, behaviour and tokens.

Draft. Ported from control-center’s Popover (from shadcn-vue) and restyled with Beehexa tokens, 12 November 2026. Not yet approved. It is in the registry so teams can try it; the API may still change before approval.

A popover is a panel that opens next to the button that opened it. It stays open until people close it, and it can hold links, buttons and fields.

When to use

  • For details or settings tied to one control: a sync schedule, filter options, a column picker.
  • For a small form of one to three fields, such as renaming an item in place.
  • For a picker, such as a calendar behind a date button.

When not to use

  • For one short line of text. Use a tooltip.
  • For a list of actions. Use a dropdown menu.
  • For a task that needs the whole attention, or a longer form. Use a dialog.
  • To confirm a can’t-undo action. Use an alert dialog.
  • For a preview of a link that opens on hover. Use a hover card.

Behaviour

  • Opens on click, Enter or Space on its trigger. The trigger keeps its pressed look while the popover is open.
  • Closes on Esc, a click outside, or the trigger again. Focus returns to the trigger.
  • Focus moves into the popover when it opens. It is not modal: the rest of the page stays usable.
  • Opens below the trigger, centred, 4 px away. It flips to the other side when there is no room. align="start" lines it up with the trigger’s start edge.
  • 288 px wide by default. Set a width the content needs, or w-auto p-0 for a calendar.

Content

  • Keep it short: a title, a sentence or two, and at most a few controls.
  • Put the primary action last, on the right, with Cancel before it (D10).
  • Don’t put a popover in a popover.

Tokens

Part Tokens
Surface color.surface.overlay, no border
Corners radius.overlay
Shadow, layer elevation.shadow.overlay, z-index.overlay
Padding space.overlay.content (16 px)
Distance from the trigger space.overlay.offset (4 px)
Title font.heading.xsmall, color.text
Text font.body.default; description color.text.subtle