Sticker Peel Effect
A die-cut sticker with a peeling corner from clip-path and a mirrored flap, with slider and hover.
AI prompt
Product photograph of a round die-cut vinyl sticker with a white border showing a smiling sun illustration, the lower right corner peeled up and curled back to reveal the pale grey paper back, a soft shadow beneath the lifted flap, sticker stuck on a matte blue laptop lid, sharp focus, soft natural window light. Negative: bubbles, wrinkles, text, other stickers, watermark. Reduced motion: still image.About this pattern
Definition
A peeling corner makes a flat graphic feel like a real sticker. The trick is geometric: the corner triangle is cut off the sticker, and its mirror image is shown as the back of the paper, lighter and with a soft shadow. Growing the triangle makes the peel larger.
When to use it
- Clip the sticker with polygon so the bottom-right triangle of size p is removed.
- Draw a flap of size p by p at that corner showing only the triangle that is the mirror of the removed one.
- Fill the flap with a light paper gradient and add a drop-shadow along the fold.
- Animate p from 0 to about 40 px on hover for a playful reveal.
What the controls do
- A Peel slider and a hover option; the sticker also reacts to focus.
Motion & timing
- The corner lifts over 250ms.
- Reduced motion: it changes instantly.
Tips & variations
- Keep the sticker's meaning clear when the corner is lifted; do not hide key text under the flap.
- Use clip-path support checks if older browsers matter.
Code of this live preview
<div class="bx"><div class="stg" id="stg"><div class="stk" id="stk" tabindex="0" aria-label="Sun sticker, peeling corner"><i class="sn"></i><i class="ry"></i><span>Hello!</span><i class="fl" id="fl"></i></div></div><div class="two"><label class="rw">Peel <b id="pv">26px</b><input id="ps" type="range" min="0" max="64" value="26"></label><label class="sw"><input id="hv" type="checkbox" checked> Peel more on hover</label></div></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}
.stg{height:140px;border-radius:12px;background:#4a73c4;display:grid;place-items:center}.stk{--p:26px;position:relative;width:104px;height:104px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.25);transition:--p .25s;display:grid;place-items:center;clip-path:polygon(0 0,100% 0,100% calc(100% - var(--p)),calc(100% - var(--p)) 100%,0 100%);overflow:visible}.stk.pe{}.stk .sn{position:absolute;width:62px;height:62px;border-radius:50%;background:#ffc93c;top:12px}.stk .ry{position:absolute;width:76px;height:76px;border-radius:50%;border:5px dotted #ffc93c;top:5px;opacity:.7}.stk span{position:absolute;bottom:20px;font:800 12px system-ui;color:#3a2a00}.fl{position:absolute;right:0;bottom:0;width:var(--p);height:var(--p);background:linear-gradient(135deg,#f2f2f0 0,#cfcfcb 100%);clip-path:polygon(0 0,100% 0,0 100%);filter:drop-shadow(-2px -2px 3px rgba(0,0,0,.3))}.stg2{}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const stk=document.getElementById('stk'),ps=document.getElementById('ps'),hv=document.getElementById('hv'),calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let base=+ps.value,cur=base,raf=0;
function set(v){stk.style.setProperty('--p',v+'px');}
function to(t){cancelAnimationFrame(raf);if(calm){cur=t;set(t);return;}const a=cur,t0=performance.now();(function f(n){const k=Math.min(1,(n-t0)/250);cur=a+(t-a)*(1-Math.pow(1-k,3));set(cur);if(k<1)raf=requestAnimationFrame(f);})(t0);}
function show(){document.getElementById('pv').textContent=base+'px';}
ps.addEventListener('input',()=>{base=+ps.value;show();cur=base;set(base);});
['mouseenter','focus'].forEach(t=>stk.addEventListener(t,()=>{if(hv.checked)to(Math.min(64,base+22));}));['mouseleave','blur'].forEach(t=>stk.addEventListener(t,()=>to(base)));set(base);show();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>Sticker Peel Effect — 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}
.stg{height:140px;border-radius:12px;background:#4a73c4;display:grid;place-items:center}.stk{--p:26px;position:relative;width:104px;height:104px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.25);transition:--p .25s;display:grid;place-items:center;clip-path:polygon(0 0,100% 0,100% calc(100% - var(--p)),calc(100% - var(--p)) 100%,0 100%);overflow:visible}.stk.pe{}.stk .sn{position:absolute;width:62px;height:62px;border-radius:50%;background:#ffc93c;top:12px}.stk .ry{position:absolute;width:76px;height:76px;border-radius:50%;border:5px dotted #ffc93c;top:5px;opacity:.7}.stk span{position:absolute;bottom:20px;font:800 12px system-ui;color:#3a2a00}.fl{position:absolute;right:0;bottom:0;width:var(--p);height:var(--p);background:linear-gradient(135deg,#f2f2f0 0,#cfcfcb 100%);clip-path:polygon(0 0,100% 0,0 100%);filter:drop-shadow(-2px -2px 3px rgba(0,0,0,.3))}.stg2{}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="stg" id="stg"><div class="stk" id="stk" tabindex="0" aria-label="Sun sticker, peeling corner"><i class="sn"></i><i class="ry"></i><span>Hello!</span><i class="fl" id="fl"></i></div></div><div class="two"><label class="rw">Peel <b id="pv">26px</b><input id="ps" type="range" min="0" max="64" value="26"></label><label class="sw"><input id="hv" type="checkbox" checked> Peel more on hover</label></div></div>
</div>
<script>
const stk=document.getElementById('stk'),ps=document.getElementById('ps'),hv=document.getElementById('hv'),calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let base=+ps.value,cur=base,raf=0;
function set(v){stk.style.setProperty('--p',v+'px');}
function to(t){cancelAnimationFrame(raf);if(calm){cur=t;set(t);return;}const a=cur,t0=performance.now();(function f(n){const k=Math.min(1,(n-t0)/250);cur=a+(t-a)*(1-Math.pow(1-k,3));set(cur);if(k<1)raf=requestAnimationFrame(f);})(t0);}
function show(){document.getElementById('pv').textContent=base+'px';}
ps.addEventListener('input',()=>{base=+ps.value;show();cur=base;set(base);});
['mouseenter','focus'].forEach(t=>stk.addEventListener(t,()=>{if(hv.checked)to(Math.min(64,base+22));}));['mouseleave','blur'].forEach(t=>stk.addEventListener(t,()=>to(base)));set(base);show();
</script>
</body></html>