Popover

Interactive content anchored to a trigger.

Base UI PopoverSource

Basic popover

Use a popover for content that the user interacts with next to a trigger. Click the trigger to open it. Set the width on Popover.Popup.

With a close button

Popover.Close closes the popover. Popover.Popup takes positioner props, such as align="start".

Open on hover

Set openOnHover on Popover.Trigger for a hover card on a trigger that is not a link. The popover still opens on click, tap, and keyboard, so all users can reach it. delay and closeDelay set the timing in milliseconds.

Usage

These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.

  • Choose the component from the trigger and the content. A hover card on a trigger that is not a link hides its content from touch users, so use a popover there.
    ComponentTriggerContentOpens on
    TooltipAny controlA short text labelHover, focus
    PreviewCardA linkA rich preview of the link targetHover, focus
    Popover with openOnHoverNot a linkRich content, with or without controlsHover, click, tap, keyboard
  • For a task that needs full focus, use Dialog.
  • Do not set overflow on Popover.Popup, because it clips the arrow. Scroll an element inside it.

API

Props that the library adds. Every part also takes all the Base UI props.

Popover.Popup

PropTypeDefaultDescription
sideOffsetnumber8The gap between the trigger and the popup, in pixels.
containerHTMLElement | ShadowRoot | RefObject | null–The element that the popup renders into. The default is the document body.