crucıble

Decal

A matte label stuck to a dark surface that physically peels — hover lifts and curls a corner back to reveal a lit paper-grey underside with a cyan specular rim and a growing drop shadow, while grabbing deepens the peel, leans the sticker, and drags it with weight before it settles home. Faint adhesive glue-string filaments stretch and snap as it lifts; the peel origin is a 360° knob. Coarse pointers and reduced motion get a static half-peeled frame with drag disabled.

gsappro

Installation

CLI

npx shadcn@latest add @crucible/decal

Manual — install dependencies, then copy the source

npm install gsap

Props

PropTypeDefaultDescription
childrenReact.ReactNodeContent printed on the sticker face (kept upright as the sticker rotates).
peelDirectionnumber45Direction the corner peels from, in degrees (0 = top edge, 90 = right edge).
peelBackHoverPctnumber30How far the corner lifts on hover, as a percent of the sticker's side length.
peelBackActivePctnumber44How far the corner lifts while grabbed/dragged, as a percent of the side length.
dragRotatenumber12Max degrees the sticker leans as you drag it sideways.
widthnumber220Sticker side length in px (it is square).
shadowIntensitynumber0.55Depth/opacity of the drop shadow the lifting sticker casts, 0–1.
lightingIntensitynumber0.6Strength of the revealed underside lighting + specular rim, 0–1.
accentstring"#67e8f8"Accent color of the thin specular line riding the rolled edge.
faceColorstring"#f2f0ea"Matte sticker face color.
undersideColorstring"#c3cbd2"Cool paper-grey color revealed on the peeled-back underside.
draggablebooleantrueEnable grab-and-drag. Ignored on coarse pointers / reduced motion.
speednumber1Settle-speed multiplier (higher = snappier).
pausedbooleanfalseFreeze to a static, invitingly half-peeled frame with no interaction.
labelstring"Sticker"Accessible label for the sticker region.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"div">, "children">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.