Decal Peel
A die-cut sticker that peels back from the edge nearest the pointer, lifts further when pressed, and can be picked up, swung, thrown and bounced around its parent.
pixikit.com/docs/effects/decal-peel
Customize
Width200px
Rotate0deg
Finish
Peel back hover pct25%
Peel back active pct40%
Peel direction0deg
Follow pointer
Curl radius12px
Back color
Lighting intensity0.50
Shadow intensity0.60
Draggable
Swing1.00
Friction0.50
Bounce0.35
Intro
Initial x0px
Initial y0px
Dpr
Props
25| Name | Type | Default | Description |
|---|---|---|---|
imageSrc | string | Required | Sticker image; use a PNG or SVG with a transparent background so the die-cut outline shows. |
alt | string | "" | What the sticker shows, for assistive tech. |
width | number | 200 | Width of the sticker, in pixels. |
rotate | number | 0 | Resting rotation of the sticker, in degrees. |
finish | "gloss" | "matte" | "holo" | "gloss" | Surface of the sticker; holo turns it into foil with rainbow bands. |
peelBackHoverPct | number | 25 | How far the sticker peels back on hover, as a percent of its size. |
peelBackActivePct | number | 40 | How far the sticker peels back while pressed or dragged. |
peelDirection | number | 0 | The edge that peels, in degrees clockwise from the top; with followPointer it is used when the pointer is near the middle. |
followPointer | boolean | true | Peels the edge or corner nearest the pointer, and the edge you grab while dragging. |
curlRadius | number | 12 | Radius of the curl where the sticker bends, in pixels; larger values feel like thicker vinyl. |
backColor | string | "#d4d4d8" | Colour of the back of the sticker, seen on the peeled part. |
lightingIntensity | number | 0.5 | Strength of the highlights that follow the pointer, 0 to 1. |
shadowIntensity | number | 0.6 | Strength of the shadows under the sticker and the peeled part, 0 to 1. |
draggable | boolean | true | Lets the sticker be picked up, dragged and thrown around its parent. |
swing | number | 1 | How much the sticker swings around the point you hold while dragging, 0 to 3. |
friction | number | 0.5 | How quickly a thrown sticker slides to a stop, from 0 (ice) to 1 (felt). |
bounce | number | 0.35 | How much of its speed a thrown sticker keeps when it hits the edge of its parent. |
intro | boolean | true | Drops the sticker onto the surface on mount and smooths its corner down. |
initialX | number | 0 | Starting offset from the centre of its parent, in pixels, to the right. |
initialY | number | 0 | Starting offset from the centre of its parent, in pixels, downward. |
onDragStart | () => void | None | Called when the sticker starts being dragged. |
onDragEnd | () => void | None | Called when the sticker is released. |
dpr | number | None | The highest device pixel ratio drawn, capped at 2. |
className | string | None | |
style | CSSProperties | None |