honestui

Morphing Dialog

Component 1

About

A card that grows into a dialog, moving its image and title into place.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Morphing Dialog to your project and fits it to your theme.

Code

How Morphing Dialog is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import {
  MorphingDialog,
  MorphingDialogClose,
  MorphingDialogContainer,
  MorphingDialogContent,
  MorphingDialogDescription,
  MorphingDialogImage,
  MorphingDialogSubtitle,
  MorphingDialogTitle,
  MorphingDialogTrigger,
} from "@/components/ui/honest-morphing-dialog";

export default function MorphingDialogDemo() {
  return (
    <MorphingDialog>
      <MorphingDialogTrigger className="w-64">
        <MorphingDialogImage src="https://cdn.21st.dev/assets/mirror/a3/a3ac0f24900fa24e1424c4b97e903c408c70355e14e2da4e7527183c7014acb2.jpg" alt="Ohio Stadium seen from the upper deck" className="h-40" />
        <div className="flex flex-col gap-0.5 p-3">
          <MorphingDialogTitle className="text-sm">Ohio Stadium</MorphingDialogTitle>
          <MorphingDialogSubtitle>Columbus, Ohio</MorphingDialogSubtitle>
        </div>
      </MorphingDialogTrigger>
      <MorphingDialogContainer>
        <MorphingDialogContent className="max-w-md">
          <MorphingDialogImage src="https://cdn.21st.dev/assets/mirror/a3/a3ac0f24900fa24e1424c4b97e903c408c70355e14e2da4e7527183c7014acb2.jpg" alt="Ohio Stadium seen from the upper deck" className="h-64" />
          <div className="flex flex-col gap-0.5 p-5 pb-0">
            <MorphingDialogTitle className="text-lg">Ohio Stadium</MorphingDialogTitle>
            <MorphingDialogSubtitle>Columbus, Ohio</MorphingDialogSubtitle>
          </div>
          <MorphingDialogDescription className="flex flex-col gap-3 p-5">
            <p>
              Opened in 1922, the horseshoe-shaped stadium on the Olentangy River seats more than
              100,000 people, which makes it one of the largest in the world.
            </p>
            <p>
              The open south end was enclosed with permanent stands in 2001, and the field was
              lowered to add rows closer to play.
            </p>
          </MorphingDialogDescription>
          <MorphingDialogClose />
        </MorphingDialogContent>
      </MorphingDialogContainer>
    </MorphingDialog>
  );
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Warp

    Warp

    1
  • Scroll Velocity Text

    Scroll Velocity Text

    1
  • Spotlight

    Spotlight

    1
  • Typewriter

    Typewriter

    1
  • Schedule Builder

    Schedule Builder

  • Audit Log

    Audit Log

  • Secret Row

    Secret Row