Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Text

Pro

Paper Cut Text for React

Text cut from layers of paper, sheets stacked under it that tilt toward the pointer like a pop-up book. For React with Base UI, when a headline should look made by hand.

Framework

Paper Cut Text stacks a line on sheets of itself, as if each letter were cut from layered paper: every sheet below sits a step lower and a shade closer to the page, and one soft shadow glues them together. While the pointer is over it the stack tilts toward it, the deeper sheets shifting further, like a pop-up book.

Use it for an editorial headline, a portfolio, or a craft-themed page that should feel made by hands. For a single still shadow of lines, use Line Shadow Text; for a pressed, embossed look, Emboss Text. The top sheet is the real text and the others are copies in shades of its colour; the pointer writes two registered CSS properties that a transition eases, so the tilt springs without an animation library. With reduced motion it doesn't tilt.

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Usage

import { PaperCutText } from "@/components/ui/paper-cut-text";
<h1>
  <PaperCutText text="Hand cut" />
</h1>

Demos

Layers

layers is how many sheets lie under the top one, 4 by default: two read as a crisp two-tone cut, six or seven as a deep pop-up. tilt={false} holds the stack still.

Preview width

Color

The sheets are shades between the text's colour and the page's: on a coloured surface, set --paper-cut-text-base to that surface's colour so the deeper sheets fade into it.

Preview width

Accessibility

The top sheet is the real text, read once by screen readers and selectable; the sheets under it are copies hidden from them and from the pointer. The tilt answers a mouse or pen, not touch, and with reduced motion the stack stays still. In forced-colors mode the sheets are dropped.

FAQ

How are the sheets coloured?

Each is a mix of the text's colour and the page's background, more of the background the deeper it lies, so the stack recedes into the page in any theme. Set --paper-cut-text-base to fade them toward another colour.

Can the stack be deeper or flatter?

Yes: layers sets how many sheets there are, and --paper-cut-text-step how far each sits below the one above (0.03em); --paper-cut-text-reach is how far the deepest sheet shifts with the tilt (0.15em).

How does the tilt feel springy without a library?

The pointer writes its place over the text into two CSS properties registered as numbers, and a transition eases them, so the stack glides after the pointer and settles back when it leaves. Nothing renders again as it moves.

Which fonts suit it?

Bold, wide letters: the sheets show at the edges, so heavy weights read best. It takes the size, weight and colour of the text around it.

What happens with reduced motion?

The stack stays as it is, without tilting toward the pointer; the look is unchanged.

API Reference

PaperCutText

<span> data-slot="paper-cut-text"

PropType
textstring

The text.

layers?number

How many sheets lie under the top one. @default 4.

Default
4
tilt?boolean

Whether the stack tilts toward the pointer while it's over the text, the deeper sheets shifting further, like a pop-up book.

Default
true
render?ReactElement | ((props: object, state: object) => ReactElement)

Replace the host element or compose it with another component.

Type
ReactElement | ((props: object, state: object) => ReactElement)
className?string

Merged with the part's classes.

CSS variableType
--paper-cut-text-basestring

The colour the deeper sheets fade toward (the page's background).

--paper-cut-text-reachstring

How far the deepest sheet shifts with the tilt (0.15em).

--paper-cut-text-stepstring

How far each sheet sits below the one above (0.03em).

All 97 text effects