Skip to content

PopoverPro

A small floating card attached to its trigger: a title and quiet line, any content, an arrow, opened by press or hover intent; Escape and a press outside close it.

oxyn add popover
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A small floating card attached to its trigger: a title and quiet line, any content, an arrow, opened by press or hover intent; Escape and a press outside close it.

When not to use

  • Actions and choices behind any trigger: use Dropdown Menu instead.
  • Eight variants and five sizes, with a shimmering loading state, a progress fill, press-and-hold for destructive actions and a shortcut chip: use Button instead.
  • An app sidebar: use Sidebar instead.

Installation

Popover is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add popover

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Press

Opens on press.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Hover

Hover intent.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

No arrow

Without the arrow.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

Popover

PropTypeDefaultDescription
triggerrequiredElement—Trigger content (rendered inside a button).
trigger_labelrequiredString—Trigger's accessible name.
childrenrequiredElement—Body.
openboolDefault::default()Start open.
sideString"bottom"`bottom` · `top` · `right` · `left`.
alignString"start"`start` · `center` · `end`.
offsetf326.0Gap px (6).
titleOption<String>Default::default()Title.
descriptionOption<String>Default::default()Quiet line.
widthOption<f32>Default::default()Width px.
focus_on_openbooltrueMove focus into the card on open.
unstyledboolDefault::default()No card chrome (content draws its own).
roleString"dialog"`dialog` or another role.
arrowboolDefault::default()Arrow.
modeString"press"`press` · `hover`.
modalboolDefault::default()Modal: dims the page and blocks outside interaction (Arc `modal`).
collision_paddingf3210.0Minimum distance from the viewport edges px (Arc `collisionPadding`, 10).
on_closeEventHandler<()>—Closed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceOpen; focus moves into the card
EscClose; focus goes back to the trigger

Accessibility

  • role=dialog named by its title; the trigger has aria-expanded and aria-controls.
  • focus_on_open moves focus into the card; closing hands it back.

Responsive behaviour

  • width sets the card width; side and align place it around the trigger.

Notes for AI

  • Import Popover from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: PopoverEl in oxyn_gpui.
  • Props to set first: trigger, trigger_label, children.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI