Product on White: Shadow Types
A product on a pure white background with four shadow styles: none, contact, soft drop and reflection.
AI prompt
Studio product photograph of a glass perfume bottle with a silver cap on a seamless pure white background, a tight dark contact shadow directly beneath it grounding the object, a very soft faint grey drop shadow stretching to the right, bright even softbox light, crisp edges, accurate colour. Variants: no shadow, and a glossy-surface reflection fading downward. Negative: grey background, harsh black shadow, floating look, text, watermark. Reduced motion: still image.About this pattern
Definition
On a white background, the shadow is what tells the viewer the product is sitting on a surface. Without it the product floats. A small dark contact shadow grounds it, a soft long shadow suggests light direction, and a faint reflection suggests a glossy surface. Choose one style and keep it consistent across a catalogue.
When to use it
- Contact shadow: small, dark and tight under the object where it touches the surface.
- Drop shadow: soft, low opacity, offset to one side.
- Reflection: a flipped, faded copy under the product.
- Keep the background pure white at about 255 and never clip the product's own highlights.
What the controls do
- Four shadow buttons and a Softness slider.
Motion & timing
- Updates are immediate.
- Reduced motion: nothing animates.
Tips & variations
- Marketplaces often forbid heavy shadows or reflections; check their rules.
- Shadows should match the light direction in the product itself.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Shadow"><button data-p="0" aria-pressed="true">None</button><button data-p="1" aria-pressed="false">Contact</button><button data-p="2" aria-pressed="false">Soft drop</button><button data-p="3" aria-pressed="false">Reflection</button></div><div class="wb" id="wb"><div class="rf" id="rf"><i class="cap"></i><i class="bd"></i></div><div class="pd"><i class="cs"></i><i class="ds"></i><div class="bt"><i class="cap"></i><i class="bd"></i></div></div></div><label class="rw">Softness <b id="sv"></b><input id="ss" type="range" min="0" max="100" value="50"></label></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.wb{position:relative;height:140px;border-radius:12px;background:#fff;border:1px solid var(--line);overflow:hidden}.pd{position:absolute;left:50%;bottom:34px;width:0;height:0}.bt{position:absolute;left:-22px;bottom:0;width:44px;height:82px}.bt i{position:absolute;display:block}.bt .cap{left:12px;top:0;width:20px;height:18px;background:linear-gradient(90deg,#8d9199,#e7e9ee 40%,#8d9199);border-radius:3px}.bt .bd{left:0;top:16px;width:44px;height:66px;border-radius:8px;background:linear-gradient(90deg,#9cc9e4,#e8f5fb 35%,#7fb3d1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}.cs{position:absolute;left:-24px;bottom:-5px;width:48px;height:8px;border-radius:50%;background:#000;opacity:0;filter:blur(2px)}.ds{position:absolute;left:-14px;bottom:-5px;width:104px;height:12px;border-radius:50%;background:#000;opacity:0;filter:blur(8px);transform-origin:left center}.rf{position:absolute;left:50%;bottom:-48px;width:44px;height:82px;margin-left:-22px;transform:scaleY(-1);opacity:0;-webkit-mask:linear-gradient(transparent 40%,rgba(0,0,0,.55));mask:linear-gradient(transparent 40%,rgba(0,0,0,.55))}.rf i{position:absolute;display:block}.rf .cap{left:12px;top:0;width:20px;height:18px;background:#b9bcc4;border-radius:3px}.rf .bd{left:0;top:16px;width:44px;height:66px;border-radius:8px;background:#b9d9ec}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const wb=document.getElementById('wb'),ss=document.getElementById('ss'),bs=[...document.querySelectorAll('#pre button')];let p=1;
function up(){const s=ss.value/100,cs=wb.querySelector('.cs'),ds=wb.querySelector('.ds'),rf=document.getElementById('rf');cs.style.opacity=p===1?.75-s*.25:p===2?.35:p===3?.18:0;cs.style.filter='blur('+(1+s*3)+'px)';ds.style.opacity=p===2?.22-(s*.08):0;ds.style.filter='blur('+(5+s*12)+'px)';rf.style.opacity=p===3?.55:0;rf.style.filter='blur('+(s*2)+'px)';document.getElementById('sv').textContent=ss.value+'%';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));ss.addEventListener('input',up);up();One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Product on White: Shadow Types — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.wb{position:relative;height:140px;border-radius:12px;background:#fff;border:1px solid var(--line);overflow:hidden}.pd{position:absolute;left:50%;bottom:34px;width:0;height:0}.bt{position:absolute;left:-22px;bottom:0;width:44px;height:82px}.bt i{position:absolute;display:block}.bt .cap{left:12px;top:0;width:20px;height:18px;background:linear-gradient(90deg,#8d9199,#e7e9ee 40%,#8d9199);border-radius:3px}.bt .bd{left:0;top:16px;width:44px;height:66px;border-radius:8px;background:linear-gradient(90deg,#9cc9e4,#e8f5fb 35%,#7fb3d1);box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}.cs{position:absolute;left:-24px;bottom:-5px;width:48px;height:8px;border-radius:50%;background:#000;opacity:0;filter:blur(2px)}.ds{position:absolute;left:-14px;bottom:-5px;width:104px;height:12px;border-radius:50%;background:#000;opacity:0;filter:blur(8px);transform-origin:left center}.rf{position:absolute;left:50%;bottom:-48px;width:44px;height:82px;margin-left:-22px;transform:scaleY(-1);opacity:0;-webkit-mask:linear-gradient(transparent 40%,rgba(0,0,0,.55));mask:linear-gradient(transparent 40%,rgba(0,0,0,.55))}.rf i{position:absolute;display:block}.rf .cap{left:12px;top:0;width:20px;height:18px;background:#b9bcc4;border-radius:3px}.rf .bd{left:0;top:16px;width:44px;height:66px;border-radius:8px;background:#b9d9ec}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Shadow"><button data-p="0" aria-pressed="true">None</button><button data-p="1" aria-pressed="false">Contact</button><button data-p="2" aria-pressed="false">Soft drop</button><button data-p="3" aria-pressed="false">Reflection</button></div><div class="wb" id="wb"><div class="rf" id="rf"><i class="cap"></i><i class="bd"></i></div><div class="pd"><i class="cs"></i><i class="ds"></i><div class="bt"><i class="cap"></i><i class="bd"></i></div></div></div><label class="rw">Softness <b id="sv"></b><input id="ss" type="range" min="0" max="100" value="50"></label></div>
</div>
<script>
const wb=document.getElementById('wb'),ss=document.getElementById('ss'),bs=[...document.querySelectorAll('#pre button')];let p=1;
function up(){const s=ss.value/100,cs=wb.querySelector('.cs'),ds=wb.querySelector('.ds'),rf=document.getElementById('rf');cs.style.opacity=p===1?.75-s*.25:p===2?.35:p===3?.18:0;cs.style.filter='blur('+(1+s*3)+'px)';ds.style.opacity=p===2?.22-(s*.08):0;ds.style.filter='blur('+(5+s*12)+'px)';rf.style.opacity=p===3?.55:0;rf.style.filter='blur('+(s*2)+'px)';document.getElementById('sv').textContent=ss.value+'%';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));ss.addEventListener('input',up);up();
</script>
</body></html>