BT-12Buttons
Morph Popover
A button that grows into the form it opens, with its label sliding up to become the title, then shrinks into a confirmation.
PROPay Button and more like it are in Kokonut UI Pro
Installation
Morph Popover is a free, open-source React component in the Kokonut UI Buttons collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/morph-popover.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/morph-popoverOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/morph-popover.tsx.
npm install motionUsage
import MorphPopover from "@/components/kokonutui/morph-popover";
export default function Example() {
return <MorphPopover />;
}Props
labelstringDefault "Feedback"The button's label, which slides up to become the panel's title.
iconReactNodeDefault <ChatIcon />placeholderstringDefault "What would make this better?"sentLabelstringDefault "Thanks!"Shown in the small pill after sending.
onSubmit(value: string) => void | Promise<void>Default pretendSendCalled with the text. A promise keeps the panel in its sending state.
align"start" | "end"Default "start"Which edge the panel grows from.
widthnumberDefault 340Panel width in px.
classNamestringExtra classes for the root element.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

