Skip to content

KPopover ​

示例 ​

Popover component with trigger and content sub-components. Supports click and hover triggers with configurable placement.

Sub-Components ​

  • KPopover — Root container that manages open state and provides context
  • KPopoverTrigger — Wraps the element that triggers the popover
  • KPopoverContent | Teleported content panel positioned relative to the trigger

Props (KPopover) ​

NameTypeDefaultDescription
openbooleanfalseWhether the popover is visible.
placement'top' | 'bottom' | 'left' | 'right''bottom'Placement of the popover relative to the trigger. Also drives the direction of the slide-in transition.
trigger'click' | 'hover''click'How the popover is triggered.
showArrowbooleantrueWhether to show an arrow pointing at the trigger.

Emits ​

NameParametersDescription
update:open(value: boolean)Emitted when the popover open state changes.

Slots (KPopover) ​

NameDescription
defaultShould contain KPopoverTrigger and KPopoverContent.

Basic Usage ​