Skip to content

Popover

Anchored surface for light content next to a control. Use for details and short actions that stay in context.

Examples

Basic

With actions

Overview

Popover opens a positioned popup from a trigger. Compose portal, positioner, popup, title, and description. Style the trigger with Button via Base UI's render prop.

tsx

import {
  Button,
  Popover,
  PopoverTrigger,
  PopoverPortal,
  PopoverPositioner,
  PopoverPopup,
  PopoverTitle,
  PopoverDescription,
} from "@standard-ui/react"

<Popover>
  <PopoverTrigger render={<Button variant="outline" />}>
    Notifications
  </PopoverTrigger>
  <PopoverPortal>
    <PopoverPositioner>
      <PopoverPopup>
        <PopoverTitle>Notifications</PopoverTitle>
        <PopoverDescription>
          You're all caught up.
        </PopoverDescription>
      </PopoverPopup>
    </PopoverPositioner>
  </PopoverPortal>
</Popover>

Usage

Trigger

Pass Button through render so the control keeps Standard UI styles without nesting buttons.

tsx

<PopoverTrigger render={<Button variant="outline" />}>
  Notifications
</PopoverTrigger>

Structure

Always include a title. Description is optional but helpful for context. Keep content short — prefer a dialog for longer flows.

tsx

<PopoverPopup>
  <PopoverTitle>Notifications</PopoverTitle>
  <PopoverDescription>
    You're all caught up.
  </PopoverDescription>
</PopoverPopup>

API

Parts mirror Base UI Popover. Prefer render={<Button />} on the trigger for consistent button styles.

PartRole
PopoverRoot state and open control.
PopoverTriggerOpens the popover. Use Button via render.
PopoverPortalRenders popup content outside the tree.
PopoverPositionerPositions the popup relative to the trigger.
PopoverPopupSurface for title, body, and actions.
PopoverTitleAccessible popover title.
PopoverDescriptionSupporting explanation.
PopoverCloseDismisses the popover.
PopoverArrowOptional arrow pointing at the trigger.

Guidelines

Do

  • Use popovers for lightweight, in-context content
  • Provide a clear title and keep copy short
  • Prefer a dialog when the task needs focus or a longer form

Don't

  • Don't nest a Button inside PopoverTrigger — use render
  • Don't put critical instructions only in a popover
  • Don't leave the popup without a title for screen readers