Morph Panel

A React button that morphs into the panel it opens on a spring, blurring the label out and the form in. Ships with a feedback form and closes on Escape.

src/registry/ui/morph-panel.tsx/r/morph-panel.json

Installation#

bash
npx shadcn@latest add https://ui.minidev.pro/r/morph-panel.json

Usage#

tsx
import { MorphPanel } from "@/components/ui/morph-panel"

export function Example() {
  return <MorphPanel />
}

API reference#

MorphPanel props
PropTypeDefault
labelReact.ReactNode"Feedback"
iconReact.ReactNode<MessageSquareIcon />
widthnumber340
anchorAnchor"top-left"
openboolean-
defaultOpenbooleanfalse
onOpenChange(open: boolean) => void-
children(api: { close: () => void }) => React.ReactNode-
onSubmit(text: string) => void | Promise<void>-
classNamestring-

Dependencies#

npm

lucide-reactmotion

Built from

No other MiniDev files
All Animated React components