Skip to content
Kura UI

Popover

stable

Floating translucent panel anchored to a trigger, with focus management and origin-aware motion.

@kura-ui/react/popoverCopy page for agents.mdregistry.json

Basic

minimal

Controlled settings panel

full

Share a chat

A chat header whose Share button opens a visibility picker and a copy-link row.

composition

Q3 churn analysis

14 messages · Private

Installation

npx shadcn@latest add https://kuro.abstergo.fyi/r/popover.json

Copies the source into components/kura/popover with its dependencies (kura-theme, utils). Tokens come from the kura-theme item.

When to use it

Use it for

  • Small interactive panels: settings for a composer, a model's details, a share menu, a filter form.
  • Content anchored to a control that should not navigate away.

Reach for something else when

  • Plain hover labels — use tooltip.
  • Choosing a model — use model-picker. Slash commands — use slash-command-menu. Global search — use command-palette.
  • Blocking decisions — use a dialog or approval-prompt.

Props

PropTypeDefaultDescription
openboolean—Controlled open state.
defaultOpenboolean—Initial open state when uncontrolled.
onOpenChange(open: boolean) => void—Called when the open state changes.
modalbooleanfalseTrap focus and block outside interaction.

All native attributes of the root element, className and ref pass through.

Anatomy

  1. PopoverRoot; owns open state.data-slot="popover"
  2. PopoverTriggerToggles the popover. Use asChild with a Button.data-slot="popover-trigger"
  3. PopoverAnchorOptional alternative positioning anchor.data-slot="popover-anchor"
  4. PopoverContentThe floating panel (portalled). Accepts side, align, sideOffset.data-slot="popover-content"
  5. PopoverCloseCloses the popover. Use asChild with a Button.data-slot="popover-close"

Accessibility

  • Role: dialog
  • Trigger gets aria-expanded and aria-controls; focus moves into the content on open and returns on close.
  • Give the content an accessible name (aria-label or a heading with aria-labelledby).
  • Reduced motion: Scale and travel are removed; content fades.
KeysAction
Enter / SpaceToggle from the trigger
EscapeClose and return focus
TabMove through content

Notes for agents

  • Always use `<PopoverTrigger asChild><Button …/></PopoverTrigger>` to avoid nested buttons.