Skip to content

Popover

Popover

<PopoverTrigger>
<Button>Options</Button>
<Popover>
<PopoverContent>Inline panel content here.</PopoverContent>
</Popover>
</PopoverTrigger>

Install: @helixui/core

import { Popover, PopoverTrigger, PopoverContent } from '@helixui/core'

status: stable · since: 0.1.0

Tags: floating, anchored, transient

Anatomy

[ trigger ]
╭───────────╮
│ content │ ← anchored
╰───▽───────╯

Layout

  • displayportal
  • widthcontent
  • heightcontent
  • intrinsicSizeanchored to trigger; placement auto
  • stackablefalse
  • fullBleedfalse

Visual

A floating panel with shadow.lg and arrow caret, anchored to a trigger. Closes on click-outside, Escape, or programmatically.

Props

NameTypeDefaultDescription
placement'top' | 'bottom' | 'start' | 'end' | …bottomAnchor placement. See react-aria docs for full enum.
offsetnumber8Distance from trigger in pixels.
isOpenbooleanControlled open state.
defaultOpenbooleanfalseUncontrolled initial open.
onOpenChange(open: boolean) => voidOpen change handler.

Slots

  • PopoverTrigger child — the anchor element
  • PopoverContent child — the floating content (renders in a portal)

Tokens used

color.bg.surface.default, color.border.default, color.text.primary, radius.md, space.4, font.family.sans, font.size.sm, shadow.md

Accessibility

Notes

  • Composed of <DialogTrigger> + <Popover> + <Dialog> from react-aria-components — focus trapping, restoration, dismiss-on-outside, escape, all built in.
  • Animation respects prefers-reduced-motion.

Composes with

ComponentRelationNote
ButtontriggerCommon opener.
IconButtontriggerCommon opener for icon-only.
DialogalternativeUse Dialog for modal/blocking interactions.
TooltipalternativeTooltip for short labels; Popover for richer content.
Menusibling

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

rich tooltip with actions

“popover anchored to a Help button”

<PopoverTrigger>
<Button variant="ghost">Help</Button>
<Popover><PopoverContent>Need help? <a href="/docs">Read the docs.</a></PopoverContent></Popover>
</PopoverTrigger>