Enter
Buttons

StickerButton

Drag the tile away from its recess and release it. A slow release settles home; a fast flick tumbles past centre before coming to rest.

Disabled

Usage

<StickerButton
  size={72}
  peelDistance={26}
  maxRotation={18}
  intensity="normal"
  spring="smooth"
  aria-label="Add"
>
  <PlusIcon size={24} />
</StickerButton>

How the motion works

Rotation is derived from horizontal displacement rather than animated independently, which is what makes it read as a physical sticker hinged at its centre — drag right and the far edge lags behind, producing tilt. The release hands the measured drag velocity to the spring as an impulse, so the tumble scales with how hard you threw it. Lift feeds both a shadow that deepens and a slight scale-up, selling the detachment from the page.

useDraguseSpringValueuseSpringVector

Props

PropTypeDefaultDescription
sizenumber72Edge length in px.
peelDistancenumber26How far the tile can be pulled from its socket, in px.
maxRotationnumber18Degrees of tilt at maximum horizontal peel.
liftScalenumber0.06Extra scale applied at full peel.
onFlick(velocity: { x, y }) => voidFires when released above flickThreshold px/s.
flickThresholdnumber900Release speed in px/s that counts as a flick.
onClick() => voidFires only when the tile was not dragged.