Toggle Sidebar B
AppearanceLight & dark mode D

Paper Crumple

An image that crumples into a textured 3D sheet while held and follows the grabbed point as you drag. Release it as a crumpled ball, unfold it flat, or leave the paper creased, with customizable folds, paper grain, lighting and shadows.

Default

Press and hold the paper to crumple it, then drag to move it. Choose what happens on release and tune the folds, grain and lighting with the controls underneath.

Dark previewReplay previewOpen in new tab
A handwritten poem on paperLoading interactive paper.

Customize

On release
Crumple amount0.85
Hold duration0.55s
Release duration0.4s
Crease strength0.18
Fold density6
Fold sharpness0.6
Wrinkle depth0.65
Paper grain0.08
Roughness0.92
Paper back
Light strength1.8
Light angle-35°
Shadow opacity0.16
Drag tilt10°
Drop radius180px
Image fit
Width400px
Height400px
Rotation0°
Fold seed7
Mesh detail64

API Reference

PaperCrumple

PropTypeDefaultDescription
srcstring-Required image URL. PNG transparency is preserved. Remote image servers must allow CORS.
altstring'Crumplable image'Image description used by the fallback and the accessible hold control.
backSrcstring''Optional image printed on the reverse. Otherwise the back uses paperColor.
widthnumber320Unfolded paper width in pixels. Scales down to fit the stage with a 24px inset.
heightnumber400Unfolded paper height in pixels. Determines the sheet aspect ratio.
sceneHeightnumber560Height of the full-width stage in pixels, including space to drag.
imageFit'cover' | 'contain''cover'Cover crops the texture; contain keeps the entire image and leaves unused space transparent.
releaseBehavior'stay' | 'restore' | 'creased''restore'Freeze the current crumple, unfold completely, or unfold with lasting crease relief.
crumpleAmountnumber0.85Maximum fold amount while held, from 0 (flat) to 1 (fully crumpled).
crumpleDurationnumber0.55Approximate settling time in seconds while holding. 0 makes the change immediate.
releaseDurationnumber0.4Approximate unfolding time in seconds. Another press can interrupt it.
foldCountnumber6Number of crease guides in the paper solver, from 3 to 16. Each seed produces a different arrangement.
foldSharpnessnumber0.6Blend from rounded wrinkles (0) to angular creases (1).
wrinkleDepthnumber0.65Compression depth, from 0 to 2. Higher values produce a tighter wad and stronger residual folds.
creaseStrengthnumber0.18Residual relief from 0 to 1 for the creased release mode. Longer holds leave stronger creases.
paperColorstring'#f4f0e8'Color of the unprinted back of the sheet.
roughnessnumber0.92Material roughness, from smooth (0) to matte (1).
paperTexturenumber0.08Fine paper-grain bump strength, from 0 to 1.
lightIntensitynumber1.8Strength of the directional light that reveals folds.
lightAnglenumber-35Direction of the key light in degrees. 0 shines from above.
shadowbooleantrueEnable self-shadowing and a soft drop shadow behind the paper.
shadowOpacitynumber0.08Opacity of the cast and drop shadows, from 0 to 1.
draggablebooleantrueMove the sheet while held. The grabbed material point follows the pointer.
dragRotationnumber10Maximum tilt in degrees while dragging. 0 disables tilt.
dragRadiusnumber180Maximum resting offset on each axis, in pixels. The stage also bounds the resting position.
returnToOriginbooleantrueRestore and creased modes return to the center. Stay mode leaves the paper where it was dropped.
rotationnumber0Initial sheet rotation in degrees.
seednumber7Seed for a repeatable arrangement of folds and paper grain.
detailnumber64Simulation detail, clamped to 32-96. Higher values add smaller folds and take longer to prepare.
disabledbooleanfalseDisable pointer and keyboard input and finish any active hold.
resetKeynumber | string0Change this value to reset the position, crumple and accumulated creases immediately.

Events

PropTypeDefaultDescription
state-change(state: 'holding' | 'flat' | 'crumpled' | 'creased') => void-Reports holding, then the selected release state: flat, crumpled or creased.
error(error: Error) => void-Emitted if WebGL initialization or image loading fails. The original image remains as a fallback.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Space + EnterHold to crumple the paper. Release to let go.
Arrow keysMove the paper while it is held. Hold Shift for larger steps.
EscapeReset the position, crumple and creases.
  • If WebGL or the image fails to load, the original image stays visible and a status message is announced.