Skip to content

Paper Peel

A paper corner curls upward and rolls back to reveal the face beneath.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import PaperPeel from "./PaperPeel";
export default function Example() {
return (
<PaperPeel
front={"A little curiosity."}
back={"Goes a long way."}
frontBackground={"#ddd2be"}
backBackground={"#62536e"}
frontColor={"#302b28"}
backColor={"#f7f0ff"}
peelSize={75}
minHeight={340}
borderRadius={16}
frontLabel={"Take a peek"}
backLabel={"Again"}
style={{
"fontSize": 44,
"fontWeight": 500,
"letterSpacing": "-.055em",
"lineHeight": 1.05
}}
undersideColor={"#f3ead7"}
curlRadius={55}
duration={1400}
/>
);
}

Using Paper Peel

Provide separate front and back content, then use peeled with onPeel to control the reveal from your application.

curlRadius and undersideColor shape the visible paper curl. minHeight should allow enough room for both faces and their content.

Props

NameTypeRequiredDefaultDescription
frontReactNodeNoundefinedAny React node for the front face.
backReactNodeNoundefinedAny React node for the revealed face.
peeledbooleanNoundefinedOptional controlled open state.
defaultPeeledbooleanNofalseInitial open state when uncontrolled.
onPeelfunctionNoundefinedCalled with the requested open state.
frontBackgroundstringNo"#ddd2be"Front face background.
backBackgroundstringNo"#62536e"Back face background.
frontColorstringNo"#302b28"Front face and trigger text colour.
backColorstringNo"#f7f0ff"Back face and trigger text colour.
undersideColorstringNo"#f3ead7"Colour of the lifted paper underside.
curlRadiusnumberNo55Curl depth in pixels, capped to fit the card.
durationnumberNo1400Duration of a full peel in milliseconds. Reduced-motion users switch faces without animation.
peelSizenumberNo65Fold size in pixels, clamped from 24 to 120.
minHeightnumber | stringNo300Minimum height in pixels or a CSS length. The component can fill a taller parent.
borderRadiusnumberNo16Container corner radius in pixels.
frontLabelstringNo"Peel"Button label to reveal the back.
backLabelstringNo"Return"Button label to restore the front.
classNamestringNo""Additional CSS classes, merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing and visual overrides.

Related components

A paper flap lifts in 3D as a message slides out of its envelope.

A lightly textured receipt pairs precise item rows with a torn paper edge.

A suspended badge swings naturally after you drag and release its handle.

Fine metallic grooves catch a shifting iridescent pointer highlight.