Morph Button Modal

A pill button that physically becomes its dialog: the surface expands on a shared-layout spring, the label blurs into a form, and submit shrinks it back into a success pill. Focus trapped and restored.

Try it: Click Invite, fill the form, Send; Esc closes.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/morph-button-modal.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/morph-button-modal. You can also copy the source into components/ui/morph-button-modal.tsx (view on GitHub).

Usage

import { MorphButtonModal } from '@/components/ui/morph-button-modal'

Props

Component props
PropTypeDefaultNotes
label / titlestring'Invite teammate'Button and dialog copy.
onSubmit({ name, email }) => void—Form submit.

Dependencies

  • motion
  • lucide-react
  • Kinetic Stats Band

    A band of big tabular numbers that count up on an expo curve when scrolled into view, with motion blur on the fast part and sparklines that draw themselves.

  • Gradient Mesh Hero

    A hero over four soft colour fields that drift on slow offset orbits and lean toward the pointer, with fine grain, a glass eyebrow pill and a blur-staggered headline.

  • Parallax Depth Stack

    A fanned card stack on CSS 3D layers: the pointer tilts it and each layer parallaxes by depth with a moving sheen; click or Enter sends the front card to the back on a spring.

  • Liquid Glass Tab Bar

    An iOS 26-style floating glass tab bar: a refractive lens slides between tabs and stretches with distance like liquid, icons pop on select, plus a floating accessory button.

  • Spring Stagger Grid

    A filterable tile grid that enters on a diagonal ripple (delay = row + column), re-flows on layout springs when filtered and exits with a quick scale-down.

  • App Store Expand Card

    Story cards that grow into a full detail sheet with a shared-layout spring: art, headline and surface morph from the card, the body rises in behind. Esc or close collapses it and returns focus.

See all 15 Motion Showcase components