Peel
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardPeel(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-peelAbout this component
A sticker on a card. Hovering curls its corner; drag the corner and it peels back along a true fold line (the perpendicular bisector of corner and pointer), the sticker clipped on one side and its paper underside mirrored on the other, revealing what is beneath. Pull far enough and it comes off; click the corner to stick it back.
Triggers
- Hover
- Click
- Card
- Mouse tracking
Techniques
- clip-path
- Event position
- CSS variables
- requestAnimationFrame
- State machine
Difficulty
Advanced
Accessibility
Keyboard and screen readers
The corner is a real button with aria-pressed: Enter or Space peels the sticker off and sticks it back.
Reduced motion
The peel jumps without easing.
Use it in anything you build, commercial and client work included. Licence