Mark Yo

Morph Popover

Component

About

A popover panel that morphs open from the corner nearest its trigger using a spring and clip-path animation, instead of simply fading or scaling in.

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

Code

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

Usage.tsx

"use client";

import {
  MorphPopover,
  MorphPopoverTrigger,
  MorphPopoverContent,
} from "@/components/ui/popover-morph";

export default function PopoverMorphDemo() {
  return (
    <div className="flex h-[420px] w-full items-center justify-center bg-background">
      <MorphPopover>
        <MorphPopoverTrigger>
          <button className="inline-flex items-center justify-center rounded-md border border-border bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-accent">
            Open popover
          </button>
        </MorphPopoverTrigger>
        <MorphPopoverContent className="w-64 p-4">
          <p className="text-sm text-foreground">
            This panel morphs open from the trigger corner instead of simply
            fading or scaling in.
          </p>
        </MorphPopoverContent>
      </MorphPopover>
    </div>
  );
}

Dependencies

More by Mark Yo

View all
  • Loader

    Loader

    64
  • Pricing Table

    Pricing Table

    23
  • Bento Grid

    Bento Grid

    1
  • Expandable Tabs

    Expandable Tabs

    1
  • Stateful Button

    Stateful Button

  • Animated Button

    Animated Button

  • Morphing Modal

    Morphing Modal

  • Kbd

    Kbd