honestui

Morphing Dialog

Component

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,
  MorphingDialogSubtitle,
  MorphingDialogTitle,
  MorphingDialogTrigger,
} from "@/components/ui/honest-morphing-dialog";

const trips = [
  {
    title: "Weekend in Columbus",
    dates: "September 12 to 14",
    notes: [
      "Friday: check in at 4 PM, dinner in German Village.",
      "Saturday: stadium tour at 10 AM, kickoff at 3:30 PM.",
      "Sunday: breakfast at North Market, train home at 1 PM.",
    ],
  },
  {
    title: "Design week in Pittsburgh",
    dates: "October 3 to 7",
    notes: [
      "Monday: talks at the Carnegie Library.",
      "Wednesday: studio visits, then the incline at sunset.",
      "Friday: closing session at noon.",
    ],
  },
];

export default function MorphingDialogList() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-3">
      {trips.map((trip) => (
        <MorphingDialog key={trip.title}>
          <MorphingDialogTrigger className="w-full p-4">
            <MorphingDialogTitle className="text-sm">{trip.title}</MorphingDialogTitle>
            <MorphingDialogSubtitle>{trip.dates}</MorphingDialogSubtitle>
          </MorphingDialogTrigger>
          <MorphingDialogContainer>
            <MorphingDialogContent className="max-w-sm p-6">
              <MorphingDialogTitle className="pr-8 text-lg">{trip.title}</MorphingDialogTitle>
              <MorphingDialogSubtitle>{trip.dates}</MorphingDialogSubtitle>
              <MorphingDialogDescription className="mt-4">
                <ul className="flex flex-col gap-2">
                  {trip.notes.map((note) => (
                    <li key={note}>{note}</li>
                  ))}
                </ul>
              </MorphingDialogDescription>
              <MorphingDialogClose />
            </MorphingDialogContent>
          </MorphingDialogContainer>
        </MorphingDialog>
      ))}
    </div>
  );
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    30
  • OTP Field

    OTP Field

  • Audio Orb

    Audio Orb

  • AI Glow Border

    AI Glow Border

  • Metaballs

    Metaballs

  • Voronoi

    Voronoi

  • Water

    Water

  • ASCII

    ASCII