Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Popover

Gooey Popover

Popover.vue

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/popover

Import the shared styles once in your application.

TSUsage
import Popover from '@/components/beui/controls/popover/Popover.vue'
import '@/components/beui/styles.css'

API Reference

Popover

v-model:open?
boolean | undefined

Controlled open state.

Default—
defaultOpen?
boolean

Uncontrolled initial open state.

Defaultfalse
trigger?
"click" | "hover"

How the popover is summoned.

Defaultclick
side?
Side

Which side of the trigger the panel oozes out of.

Defaultbottom
align?
Align

Alignment along the trigger's edge.

Defaultcenter
sideOffset?
number

Gap between trigger and panel, in px: the length of the gooey neck.

Default14
panelRadius?
number

Corner radius of the open panel, in px.

Default16
gooStrength?
number

Blur radius feeding the goo filter; higher melts more.

Default8
class?
string
Default—
label?
string

Accessible name of the panel (and the built-in trigger's text when no `#trigger` slot is given).

Default—
asChild?
boolean

Use the `#trigger` slot's own element as the trigger instead of a built-in button.

Default—
triggerVariant?
"primary" | "secondary" | "outline" | "ghost"

Variant of the built-in trigger button.

Defaultsecondary
contentClass?
string
Default—
contentStyle?
StyleValue
Default—
#trigger?
slot

The trigger. With `asChild` its own element is the trigger; otherwise it is the label of the built-in button.

Default—
#default?
{ close: () => void }

Panel content, or `PopoverTrigger` and `PopoverContent` when composed from parts. `close` shuts the popover.

Default—

PopoverTrigger

#default?
slot

The single element that summons the popover.

Default—

PopoverContent

class?
string
Default—
#default?
{ close: () => void }

Panel content. `close` shuts the popover.

Default—

Morph Popover

PopoverMorph.vue

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/popover-morph

Import the shared styles once in your application.

TSUsage
import PopoverMorph from '@/components/beui/controls/popover/PopoverMorph.vue'
import '@/components/beui/styles.css'

API Reference

MorphPopover

v-model:open?
boolean | undefined

Controlled open state.

Default—
defaultOpen?
boolean

Uncontrolled initial open state.

Defaultfalse
class?
string
Default—
side?
"top" | "bottom"
Defaultbottom
align?
"start" | "end"
Defaultstart
sideOffset?
number

Gap between trigger and panel, in px.

Default8
radius?
number

Panel corner radius, in px.

Default16
shadow?
boolean

Draw the surface shadow.

Defaulttrue
label?
string

Built-in trigger text and fallback panel name.

Default—
asChild?
boolean

Use the `#trigger` slot's own element as the trigger instead of a built-in button.

Default—
contentClass?
string
Default—
contentStyle?
StyleValue
Default—
onOpenAutoFocus?
(content: HTMLElement) => void

Runs after the portalled surface is positioned and visible. Passing it hands focus to the caller.

Default—
initialFocus?
HTMLElement | null | (() => HTMLElement | null)

Element to focus when a keyboard open shows the panel. Defaults to the first focusable element.

Default—
#trigger?
slot

The trigger. With `asChild` its own element is the trigger; otherwise it is the label of the built-in button.

Default—
#default?
{ close: () => void }

Panel content, or `MorphPopoverTrigger` and `MorphPopoverContent` when composed from parts. `close` shuts the popover.

Default—

MorphPopoverContent

side?
"top" | "bottom"
Default—
align?
"start" | "end"
Default—
sideOffset?
number

Gap between trigger and panel, in px.

Default—
radius?
number

Panel corner radius, in px.

Default—
shadow?
boolean

Draw the surface shadow.

Defaultundefined
onOpenAutoFocus?
(content: HTMLElement) => void

Runs after the portalled surface is positioned and visible. Passing it hands focus to the caller.

Default—
initialFocus?
HTMLElement | null | (() => HTMLElement | null)

Element that takes focus when the panel opens from the keyboard; falls back to the first focusable control.

Default—
class?
string
Default—
#default?
{ close: () => void }

Panel content. `close` shuts the popover.

Default—

Updated