Skip to content
PixiKit

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
NameTypeDefaultDescription
imageSrcstringRequiredSticker image; use a PNG or SVG with a transparent background so the die-cut outline shows.
altstring""What the sticker shows, for assistive tech.
widthnumber200Width of the sticker, in pixels.
rotatenumber0Resting rotation of the sticker, in degrees.
finish"gloss" | "matte" | "holo""gloss"Surface of the sticker; holo turns it into foil with rainbow bands.
peelBackHoverPctnumber25How far the sticker peels back on hover, as a percent of its size.
peelBackActivePctnumber40How far the sticker peels back while pressed or dragged.
peelDirectionnumber0The edge that peels, in degrees clockwise from the top; with followPointer it is used when the pointer is near the middle.
followPointerbooleantruePeels the edge or corner nearest the pointer, and the edge you grab while dragging.
curlRadiusnumber12Radius of the curl where the sticker bends, in pixels; larger values feel like thicker vinyl.
backColorstring"#d4d4d8"Colour of the back of the sticker, seen on the peeled part.
lightingIntensitynumber0.5Strength of the highlights that follow the pointer, 0 to 1.
shadowIntensitynumber0.6Strength of the shadows under the sticker and the peeled part, 0 to 1.
draggablebooleantrueLets the sticker be picked up, dragged and thrown around its parent.
swingnumber1How much the sticker swings around the point you hold while dragging, 0 to 3.
frictionnumber0.5How quickly a thrown sticker slides to a stop, from 0 (ice) to 1 (felt).
bouncenumber0.35How much of its speed a thrown sticker keeps when it hits the edge of its parent.
introbooleantrueDrops the sticker onto the surface on mount and smooths its corner down.
initialXnumber0Starting offset from the centre of its parent, in pixels, to the right.
initialYnumber0Starting offset from the centre of its parent, in pixels, downward.
onDragStart() => voidNoneCalled when the sticker starts being dragged.
onDragEnd() => voidNoneCalled when the sticker is released.
dprnumberNoneThe highest device pixel ratio drawn, capped at 2.
classNamestringNone
styleCSSPropertiesNone

Related