Skip to content
Ballpoint

Paper

A sheet with a real paper texture on any paper colour: plain, ruled, squared or dotted, torn, dog-eared or taped, with coffee rings, age spots and a desk lamp at night.

Only in Ballpoint

Plain

A clean sheet, with a coffee ring where the cup was set down.

Ruled

Buy ink.

Fill the notebook.

Text in the sheet's line height sits on the lines.

Squared

For plans, diagrams and things that need to line up.

Dotted

With age spots, and a desk lamp when the page turns to night.

Installation

pnpm dlx shadcn@latest add @ballpoint/paper

Usage

tsx
import { Paper } from "@/components/ui/paper"

<Paper variant="ruled" margin lifted edge="torn" tape="top" tilt={-1}>
  <p>Dear diary,</p>
</Paper>

Examples

Torn, dog-eared, taped

Tear a sheet from a pad, turn its corner down, or tape it to the page. Tilt any of them, as if they had been dropped there.

Torn

Out of a pad.

The shadow follows the tear.

Dog-eared

The corner turned down, to find the page again.

Taped

Over a corner, or across the top.

A letter

Ruled paper with a margin, a dog-ear and a coffee ring, set with a letter.

Tuesday

Dear Ada,

The ink arrived, and the cream notebooks are exactly the shade I hoped for. I have already filled four pages.

More soon,

Grace

Controls on paper

Inputs, checkboxes and buttons draw on the sheet as if it were their own paper.

Save me a seat

Controls draw on the sheet as if it were their own paper.

Texture, stains, age

Turn the grain off, add up to three coffee rings, or scatter age spots.

Flat

texture={false}: no grain, no fibres.

Stained

Three coffee rings.

Aged

Age spots (foxing).

API reference

variant
default "plain"
"plain" | "ruled" | "grid" | "dots"

Plain, ruled like a notebook, squared like graph paper, or dotted. Lines are --paper-rule apart (2rem), in the ink at low strength.

margin
default false
boolean

The red margin line down the left (--paper-margin), with the content moved clear of it.

edge
default "straight"
"straight" | "torn" | "dog-ear"

Cut square, torn from a pad (the outline is seeded, and the shadow follows it), or with the bottom corner turned down.

tape
default "none"
"none" | "top" | "corner"

A strip of washi tape across the top, or over the top-left corner.

tilt
default 0
number

Degrees to turn the sheet, as if it were dropped there. Under 2 reads as paper; more reads as a mess.

texture
default true
boolean

The grain and fibres. They work on any paper colour, and average out to it, so text contrast is the contrast against --paper.

stains
default 0
number

Coffee rings, up to 3. Brown by day; a faint warm tide line at night.

foxing
default false
boolean

Age spots scattered over the sheet.

lamp
default false
boolean

At night, a desk lamp warming the top of the sheet. Nothing by day.

lifted
default false
boolean

A soft shadow under the sheet, following its outline.

as
default "div"
"div" | "main" | "section" | "article" | "aside"

The element.

seed
string | number

Moves the coffee rings and the tear.