Sticker Peel
Die-cut stickers on a board, in a set you can swap. Press one and pull to peel it back over itself.
Press a sticker and pull to peel it off. With the keyboard, tab to one and use the arrow keys.
Printed vinyl stickers lie loose on a board. Press one and pull: the paper under your hand folds back over the rest of itself and what shows is its own backing. Keep pulling and the last of the adhesive lets go, after which the sticker follows you with the fold trailing behind. Let go and it lies down flat wherever you dropped it, leaving a dashed die-cut outline where it was while it is up.
With the keyboard, tab to a sticker and use the arrow keys. A tap moves it a step with a small curl, and holding a key builds a longer peel.
How it works
- The fold is geometry, not an animation. Reflecting the sticker across a crease square to the peeling edge, half the peel in front of it, carries that edge exactly onto the hand. The only moving number is how far the edge has been carried.
- One polygon clips both layers. The front face is clipped to the half of the board the sticker still lies on, and the reflected flap lands in exactly that half, so there is no second clip to keep in step.
- The peeling edge is picked once per gesture. It is the direction of the first real movement, and it is held, so a lifted corner never jumps sides when the drag turns.
- Nothing renders per frame. The loop writes straight to the DOM, so crossing the board costs no React renders. The only state is the pile order.
- Pointer, keys and landing share one path. The crease is whatever the body is behind its target by, so a drag, an arrow key and a drop all curl the same way.
- Reduced motion removes the easing lag, so the sticker tracks your hand exactly and the fade and shadow transitions are dropped. The peel itself still follows the pointer, because it is the interaction.
Installation
Usage
import StickerPeel from "@/components/ui/sticker-peel";
<StickerPeel />;The component draws its own board, a light 1.55:1 surface that fills the width of its container, with a short hint underneath. Pass className to change the outer wrapper, and stickers to change what lies on it. A sticker is a single die-cut path, its print, its inks and where it rests, defined by the StickerDef type in motifs.tsx, and the fold geometry and its constants are in peel.ts. The sticker inks keep their own palette, since a printed sticker's colours are the object.
Swapping the stickers
The default set is eight streetwear stickers in streetwear.tsx. ICONS in motifs.tsx is the original five, for anyone who wants the old look.
import StickerPeel from "@/components/ui/sticker-peel";
import { ICONS } from "@/components/ui/sticker-peel/motifs";
<StickerPeel stickers={ICONS} />;A new set of ids is a new board and the pile starts over; the same ids in a new array do not. To make your own, write a StickerDef: a cut path drawn in a 100 unit box centred on the origin, an ink for the vinyl, its gloss, its edge and its print, and the art itself as SVG in the same box. scalloped and star in motifs.tsx draw the two shapes that are tedious by hand.
const sticker: StickerDef = {
id: "moon",
label: "Moon sticker",
cut: "M 0 -44 A 44 44 0 1 1 0 44 A 44 44 0 1 1 0 -44 Z",
ink: { face: "#1b2a5a", glow: "#4c63b6", edge: "#0e1735", mark: "#f6efd6" },
art: <circle r="18" fill="#f6efd6" />,
at: { x: 0.5, y: 0.5 },
size: 0.32,
angle: -6,
};About the streetwear set
Every sticker in it is original. They are drawn from genres, such as the box logo, the outdoor-tech shield and the workwear label, and the names on them are invented. None copies a real brand's mark, lettering or colours. A real logo is somebody's trademark and its artwork is copyrighted, so it does not belong in a registry that other projects copy from. Pass your own stickers for artwork you have the rights to.