Skip to content

Popover ​

Displays rich content in a portal, anchored to its trigger. Flips and shifts to stay on screen.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Side ​

side: top | right | bottom | left

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

SPopover ​

shadcn-vue Popover.

PropTypeDefaultDescription
open!!boolean | undefinedundefined
defaultOpenbooleanfalse
EventTypeDefaultDescription
onOpenChange(open: boolean) => void() => { }

Slots: children (trailing closure)

SPopoverTrigger ​

Toggles the popover; its bounds are the anchor.

Slots: children (trailing closure)

SPopoverClose ​

Closes the popover when tapped.

Slots: children (trailing closure)

SPopoverContent ​

Anchored panel: bg-popover w-72 rounded-md border p-4 shadow-md, flips / shifts to stay on screen.

PropTypeDefaultDescription
sideSparkSide
SparkSide = 'top' | 'right' | 'bottom' | 'left'
'bottom'
alignmentSparkAlign
SparkAlign = 'start' | 'center' | 'end'
'center'
sideOffsetnumber4
alignOffsetnumber0
panelWidthnumber288Panel width in vp (shadcn w-72 = 288).
tokensSparkSurfaceTokens{}Per-instance surface token overrides (instance → theme tokens → recipe), see {@link SparkSurfaceTokens}.

Slots: children (trailing closure)

MIT Licensed