Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Popover

A popover component with smart placement and a trigger slot.

vu-popover · @velkin/react/popover

Copy page

Import

React
npm i @velkin/react

import { VuPopover } from "@velkin/react/popover";

Examples

API

Props

PropTypeDefaultDescription
openbooleanfalseWhether the popover is open.
anchorVuPopoverAnchor—Anchor selector, element, or ref object.
anchorScopeVuPopoverAnchorScope"document"`document` or shadow `root` lookup for selectors.
anchorElnull | HTMLElement—Direct anchor element (JS only).
placementVuPopoverPlacement"auto"Preferred placement before flip.
alignVuPopoverAlign"start"Alignment along the anchor edge.
gapnumber6Gap between anchor and surface in px.
paddingnumber8Viewport edge inset for flip/clamp math in px.
matchAnchorWidthbooleanfalseMatches surface width to the anchor.
maxWidthToViewportbooleantrueCaps surface width to the viewport.
maxWidthModeVuPopoverMaxWidthMode"cap"Max-width application strategy.
flipbooleantrueEnables placement flipping.
flipOrderVuPopoverFlipSide[][]Preferred flip order.
presetVuPopoverPreset"scale"Open/close animation preset.
durationnumber220Open animation duration in ms.
closeDurationnumber180Close animation duration in ms.
animateRepositionbooleantrueAnimates position updates while open.
repositionMsnumber160Reposition animation duration in ms.
closeOnEscapebooleantrueCloses on Escape.
closeOnOutsidebooleantrueCloses on outside pointer down.
restoreFocusOnClosebooleantrueRestores focus to the prior active element.
ignoreOutsideSelectorstring""Selector for elements that ignore outside dismiss.
ignoreOutsideAttrstring"data-popover-ignore-outside"Attribute marking ignore zones for outside dismiss.
groupEventNamestring—Optional coordinated group event channel.
groupIdunknown—Optional group identifier for coordinated open/close.

Events

EventDetailDescription
vu-openCustomEvent<void>When the popover begins opening.
vu-closeCustomEvent<void>When the popover begins closing.
vu-open-changeVuPopoverOpenChangeDetailWhen `open` changes.

Slots

SlotDescription
—- Popover body (light DOM for host styling compatibility).

CSS parts

PartDescription
baseHost is the positioned `popover="manual"` surface.

Methods

MethodDescription
show- Sets `open` to true.
hide- Sets `open` to false.
toggle- Toggles `open`.
reconnectTarget- Re-resolves the anchor and syncs controller state.

Types

NameDefinition
HTMLElement | null
null | HTMLElement
VuPopoverAlign
"start" | "center" | "end"
VuPopoverAnchor
undefined
| null
| string
| HTMLElement
| {
  value?: HTMLElement | null;
}
VuPopoverAnchorScope
"document" | "root"
VuPopoverMaxWidthMode
"fill" | "cap"
VuPopoverOpenChangeDetail
{ open: boolean; reason: CloseReason; }
VuPopoverPlacement
"top" | "bottom" | "left" | "right" | "auto"
VuPopoverPreset
"soft"
| "none"
| "fade"
| "scale"
| "slide"
| "iosMenu"
| "iosSheet"
| "materialMenu"
| "materialSheet"
| "floaty"
| "sharp"
| "blurIn"
| "blurFade"
| "zoomFromAnchor"
| "zoomFromCorner"
| "flip3d"
| "card3d"
| "tilt3d"
| "depth3d"
| "rotate3d"
| "springy"
| "bouncy"
| "glide"
| "pop"
| "drop"
| "grow"

Related

Feedback

  • AlertAn alert component with intent colors, variants, and optional dismiss.
  • DialogA dialog component with region slots, focus trap, and backdrop.
  • DrawerA drawer component with slide-in panel, backdrop, and focus trap.
  • NotificationA notification component that renders the toast viewport.
  • OverlayAn overlay component with backdrop and centered content slot.
  • ProgressA progress component with linear, ring, and indeterminate modes.

Guides

  • AccessibilityLabels and overlays
  • AppearanceStatus colors

Browse

  • Previous: OverlayEarlier in the sidebar
  • Next: ProgressLater in the sidebar
  • All componentsBrowse the full index