Popover

Two popovers with different personalities: a gooey one that melts away from its button via an SVG filter, a sticky neck stretching and then snapping, and a morph one that unclips from the trigger's nearest corner as a single surface. Both can be controlled.

Gooey Popover

popover.tsx

Popover, PopoverTrigger and PopoverContent with side, align, gap and corner radius props; trigger and panel melt together through a blur-based goo filter (gooStrength sets how runny), while the real content fades in sharp on top. Opens on click or hover.

Popover Gooey Popover preview width

Install

$ bunx --bun shadcn add @karaui/popover
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

Popover

open?
boolean

Controlled open state.

—
defaultOpen?
boolean

Uncontrolled initial open state.

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

How the popover is summoned. Default "click".

click
side?
"bottom" | "top"

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

bottom
align?
"end" | "start" | "center"

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

center
sideOffset?
number

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

14
panelRadius?
number

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

16
gooStrength?
number

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

8
className?
string
—

PopoverTrigger

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

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

—

PopoverContent

className?
string
—

Morph Popover

popover-morph.tsx

MorphPopover, MorphPopoverTrigger and MorphPopoverContent: the panel is rendered full size from the start but cropped down to the corner beside the trigger, then the crop springs open, so text and borders never scale. Escape or an outside click closes it.

Popover Morph Popover preview width

Install

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

API Reference

MorphPopover

open?
boolean

Controlled open state.

—
defaultOpen?
boolean

Uncontrolled initial open state.

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

MorphPopoverContent

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

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

8
radius?
number

Panel corner radius, in px. Default 16.

16
className?
string
—

Updated