A product card where tapping swatches cross-fades the hero object's tint through a soft studio-light gradient, letting shoppers preview colorways instantly. It feels premium because every transition keeps the warm ivory cyclorama lighting intact instead of flashing flat color.
// Drop the standalone colorway-swatch-morph.html into /public/effects/colorway-swatch-morph.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function ColorwaySwatchMorphEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/colorway-swatch-morph.html"
title="Colorway Swatch Morph"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Build a warm-luxury e-commerce product card called "Colorway Swatch Morph". Surface: ivory/sand cyclorama (#f4efe7) with a soft elliptical floor shadow and a gentle top-left studio highlight. Layout: a centered product silhouette (inline SVG perfume flacon or sneaker, ~260px) above a row of 5 circular colorway swatches (28px, 2px ring, active ring offset 3px).
Mechanics: each swatch has data-tint. On click/pointerdown, set CSS var --tint on the product wrapper and animate a layered SVG gradient fill (linear-gradient 135deg from lighten(tint) to tint) plus a subtle inner highlight overlay via mix-blend-mode: soft-light so the object keeps its ceramic/glass sheen rather than turning flat. Transition 420ms cubic-bezier(.22,1,.36,1) on fill and a 160ms scale(0.94) press on the swatch. Floor shadow hue shifts 8% toward the tint.
Mobile: swatches 36px tap targets, no hover dependency, pointerup + click both supported. Accessibility: prefers-reduced-motion reduces transitions to 1ms and swaps cross-fade for instant fill; swatches are role=radio with aria-checked; arrow-key navigation between swatches.
Palette: ivory #f4efe7, stone #1c1917, tints #c87d32 #6b7f6e #b8534a #3f5c78 #a8905f. Zero dependencies, single HTML file. Update --accent/--accent2 on window message {type:'prompt-lab-theme'}.
Deliver ~180 lines, 60fps, copy-paste ready.WHY THIS WORKS IN PRODUCTION
- Soft-light overlay keeps glass/ceramic sheen during tint change
- 420ms spring cross-fade; press feedback on each swatch
- 36px mobile tap targets + arrow-key swatch navigation
- Reduced-motion swaps cross-fade for instant fill, zero deps
DROP-IN SPECS // WEB & MOBILE FIT






