52 Pro components and page blocks

Get Pro

Morphing Popover

New

Preview

Customize

Top left
Width340px
Duration0.50s
Bounce0.10

Usage

import { MorphingPopover } from "@/components/uibrik/morphing-popover/morphing-popover";

<MorphingPopover>…</MorphingPopover>

Installation

npx shadcn@latest add https://uibrik.com/r/morphing-popover.json
Adds the files to components/uibrik/morphing-popover and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/morphing-popover.

Props

MorphingPopover
origin
Type "top-left" | "top-right" | "bottom-left" | "bottom-right"
"top-left"
Corner of the button the panel stays pinned to as it grows.
width
Type number
340
Width of the open panel.
duration
Type number
0.5
How long the morph takes.
bounce
Type number
0.1
Springiness of the morph. 0 settles without overshoot.
childrenrequired
Type ReactNode | (close) => ReactNode
–
What's inside the panel. Mark a field with data-autofocus to focus it on open.
label
Type string
"Feedback"
Text of the button, and the panel's title.
open / onOpenChange
Type boolean / (open) => void
–
Controlled open state.
className
Type string
–
Classes for the surface.
panelClassName
Type string
–
Classes for the panel's content box (padded by default).