Skip to content

Components · Overlays

Popover

Non-modal floating panel.

@rookcom/monarch-reactComponent

Filters

Usage examples

The example at the top of the page is the only one for this component.

Purpose

A non-modal floating panel for filters, pickers and quick edits, anchored to a trigger.

Use when

  • Interactive content that belongs to one control, such as a filter panel.

Avoid when

  • Plain descriptive text on hover: use Tooltip.
  • A list of actions: use DropdownMenu.
  • A blocking decision: use Dialog.

Design principles

  • Give the content an accessible name with aria-label or a heading.

API reference

import { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from '@rookcom/monarch-react';
ExportKindRenderingRoot class
Popovercomponentclient.mn-popover
PopoverAnchorcomponentclient.mn-popover
PopoverClosecomponentclient.mn-popover
PopoverContentcomponentclient.mn-popover
PopoverTriggercomponentclient.mn-popover

Root, Trigger, Anchor and Close are the Radix Popover parts.

PopoverContent defaults to align="start" and sideOffset={6} and renders in a portal.

Generated from the TypeScript declarations of packages/react/src/components/overlays/popover.

Properties

Popover

Non-modal floating panel for filters, pickers and quick edits.

PropTypeDescription
childrenReact.ReactNode

PopoverAnchor

PropTypeDescription
asChildboolean
childrenReactNode
classNamestring
idstring

PopoverClose

PropTypeDescription
asChildboolean
childrenReactNode
classNamestring
disabledboolean
idstring

PopoverContent

PropTypeDescription
asChildboolean
childrenReactNode
classNamestring
idstring

PopoverTrigger

PropTypeDescription
asChildboolean
childrenReactNode
classNamestring
disabledboolean
idstring

Variants

Popover has no visual variants.

States

StateExposed asBehaviour
Open / closeddata-stateFrom Radix; opens with mn-pop-in.

Interaction behaviour

  • Clicking the trigger toggles the panel.
  • Escape or a click outside closes it and focus returns to the trigger.

Keyboard support

KeysAction
Enter / SpaceOn the trigger, opens the popover.
EscapeCloses it and returns focus to the trigger.

Accessibility

Role
dialog
Accessible name
aria-label on PopoverContent.
  • The trigger exposes aria-haspopup="dialog" and aria-expanded.

Responsive behaviour

  • Width fits content up to min(24rem, 100vw - 2rem).

Theme support

  • Semantic surface, border and shadow tokens; themes apply automatically.

Do and don't

Do

  • Name the popover content.

Don't

  • Do not use a popover for content the user must act on before continuing.

Dependencies

KindDepends on
npm packages@radix-ui/react-popoverreact
Monarch componentsNone

Testing coverage

  • Opens on click and closes with Escape, returning focus to the trigger.
  • No axe violations in the open panel (jsdom).
  • Renders on the server (closed).
CheckCovered
Axe in jsdomYes
Server renderingYes
Browser suitesVisual baselines: /__gallery

Tests: packages/react/src/components/overlays/popover