Popover

Gooey Popover

popover.tsx

Install

$ bunx --bun shadcn add @beui/popover

API Reference

Popover

open?
boolean

Controlled open state.

Default—
defaultOpen?
boolean

Uncontrolled initial open state.

Defaultfalse
onOpenChange?
((open: boolean) => void)
Default—
trigger?
"click" | "hover"

How the popover is summoned. Default "click".

Defaultclick
side?
"top" | "bottom"

Which side of the trigger the panel oozes out of. Default "bottom".

Defaultbottom
align?
"center" | "end" | "start"

Alignment along the trigger's edge. Default "center".

Defaultcenter
sideOffset?
number

Gap between trigger and panel, in px — the length of the gooey neck. Default 14.

Default14
panelRadius?
number

Corner radius of the open panel, in px. Default 16.

Default16
gooStrength?
number

Blur radius feeding the goo filter — higher melts more. Default 8.

Default8
className?
string
Default—

PopoverTrigger

children
ReactElement<unknown, string | JSXElementConstructor<any>>

A single focusable element (e.g. a Button) that opens the popover.

Default—

PopoverContent

className?
string
Default—

Morph Popover

popover-morph.tsx

Install

$ bunx --bun shadcn add @beui/popover-morph

API Reference

MorphPopover

open?
boolean

Controlled open state.

Default—
defaultOpen?
boolean

Uncontrolled initial open state.

Defaultfalse
onOpenChange?
((open: boolean) => void)
Default—
className?
string
Default—

MorphPopoverContent

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

Gap between trigger and panel, in px. Default 8.

Default—
radius?
number

Panel corner radius, in px. Default 16.

Default—
shadow?
boolean

Draw the surface shadow. Default true.

Default—
onOpenAutoFocus?
((content: HTMLDivElement) => void)

Runs after the portalled surface is positioned and visible. Passing it hands focus to the caller: the panel then moves no focus on its own.

Default—
initialFocus?
RefObject<HTMLElement | null>

Element to focus when the trigger opens the panel by keyboard. Defaults to the first focusable element in the panel, or the panel itself. A pointer open does not move focus. Ignored with `onOpenAutoFocus`.

Default—
className?
string
Default—

Updated