Product Quick View
- from @ecomcn
- by ecomcn <hello@ecomcn.dev>
Quick view with a shared-element morph: the card image grows into the dialog and shrinks back on close. Motion's layoutId drives the morph, a native <dialog> does the modal work, focus returns to the trigger, and reduced-motion users get no movement. The one ecomcn block that depends on motion — opt-in.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @ecomcn/product-quick-viewRegistry dependencies3
- button
- @ecomcn/price-tag
- @ecomcn/product-card
