MotionClient component
Morphing Surface
Open a card into a connected detail surface with shared media and title transitions.
Open the card, then close with Escape
Usage
tsx
import { MorphingSurface } from "@/components/effects/morphing-surface"
<MorphingSurface title="Field study" description="A closer look at the project" media={<img src="/cover.webp" alt="Field study" />}>
<p>The full project story goes here.</p>
</MorphingSurface>API reference
| Prop | Type / default | Description |
|---|---|---|
| title / description | string | Card and accessible dialog heading and description. |
| media | ReactNode | Shared card and dialog visual. Avoid nested interactive controls in the card trigger. |
| children | ReactNode | Expanded detail content. The dialog handles focus, dismissal and scrolling. |
Use className to adjust layout and styling. New effects respect system reduced-motion preferences and the preview motion setting.