Skip to content
Latestv1.0.63

Popover ​

Displays richer content than Tooltip, commonly used for showing detailed information, form submissions, or user guidance.

Basic Usage ​

Quickly configure a standard card via title and content.

Basic Usage

Placement ​

Supports 12 directions of popup positioning.

Placement

Feature Alignment (Popconfirm) ​

Popover supports configuring structured content like Popconfirm, including icons, titles, and descriptions.

Feature Alignment Example

Triggers ​

Supports multiple trigger methods: hover, click, focus, contextmenu. Also supports combinations such as ['hover', 'click'].

Triggers

Advanced Slot Content ​

Supports header, content, footer, and icon slots for richer card composition.

Advanced Slot Content

Controlled Visibility ​

Use v-model:visible to manually control component state synchronization.

Manual Control

Use in Nuxt ​

Popover fully supports Nuxt 3/4 SSR rendering. When using in Nuxt projects, components are automatically imported without manual registration.

Use in Nuxt

SSR Notes:

  • Fully supports Server-Side Rendering (SSR) without hydration-specific runtime requirements in the component itself
  • The popup layer is teleported to body by default and can be disabled with teleported
  • Visual appearance follows the shared overlay theme tokens used by Tooltip and other floating layers

SSR Transparency

The Popover component uses Backdrop-filter acrylic effect, which automatically degrades to solid color in SSR environment until client-side activation, ensuring optimal loading performance.

API ​

Props ​

PropDescriptionTypeDefault
titleTitlestring-
descriptionDescription text aligned with Popconfirmstring-
iconIcon name aligned with Popconfirmstring-
icon-colorIcon colorstring-
contentContent textstring-
placementPopup positionPlacement'bottom'
visibleManual control visibilityboolean | nullnull
triggerTrigger methodPopoverTrigger | PopoverTrigger[]'click'
effectTheme style'light' | 'dark' | string'light'
disabledWhether to disablebooleanfalse
show-arrowWhether to show arrowbooleantrue
show-afterShow delay in millisecondsnumber0
hide-afterHide delay in millisecondsnumber100
offsetPopup offset[number, number][0, 12]
widthPopup widthstring | number'auto'
max-heightMaximum popup heightstring | number'none'
scrollableWhether content becomes scrollable when max-height is setbooleanfalse
interactiveWhether the mouse can enter the popup without immediately hiding itbooleantrue
match-trigger-widthWhether the popup width should follow the trigger widthbooleanfalse
z-indexPopup z-indexnumber2003
teleportedWhether to mount the popup to bodybooleantrue
popper-classCustom popup classstring-
popper-styleCustom popup styleStyleValue{}
transitionTransition namestring'yh-popover-fade'
persistentWhether the popup DOM stays mounted while hiddenbooleantrue
theme-overridesComponent-level theme overridesComponentThemeVarsundefined

Events ​

Event NameDescriptionParameters
update:visibleTriggered when visibility changes(visible: boolean)
showTriggered when shown-
hideTriggered when hidden-

Slots ​

Slot NameDescription
defaultTrigger element
headerCustom header/title content
contentCustom body content
iconCustom icon area
footerCustom footer action area

Expose ​

NameDescriptionType
toggleManually toggle visibility(val: boolean) => boolean
visibleCurrent visibility stateRef<boolean>

Theme Variables ​

Popover accepts themeOverrides, but source does not define a dedicated component-only CSS variable table. Its visual styles are mainly composed from shared overlay tokens such as --yh-bg-color-overlay, --yh-radius-lg, --yh-shadow-lg, and the shared text color tokens inherited through the underlying floating layer.


Tip: Popover is deeply integrated with the underlying Tooltip engine, with excellent performance, supporting 12-direction popup and fitting naturally into Nuxt SSR projects.

Type Exports ​

NameDescription
YhPopoverPropsComponent props type
YhPopoverEmitsComponent emits type
YhPopoverSlotsComponent slots type
YhPopoverExposeComponent expose type
YhPopoverTriggerTrigger union type
YhPopoverInstanceComponent instance type

Released under the MIT License.