Skip to content
Ballpoint

Scrawl

The scratches a ballpoint leaves in a margin while it gets going (a zigzag, a worked-over corner, a star, slashes, a spiral, loops, a wave) and a proofreader's marks (a cross, an asterisk, a ring, a tick), in ink or red pen.

Only in Ballpoint
  • zigzag
  • corner
  • star
  • slash

Installation

pnpm dlx shadcn@latest add @ballpoint/scrawl

Usage

tsx
import { Scrawl } from "@/components/ui/scrawl"

<section className="relative">
  <Scrawl kind="star" rotate={-8} className="absolute -right-16 top-4" />
  …
</section>

Examples

As a stamp

Position a scrawl on a corner of a card, staggering the delay so each is drawn in turn.

Draft: launch post
Reviewed by two people.
Looks good. Ship it on Tuesday.

As dividers

A scrawl between sections, a different one each time.

Mornings

Coffee, then the first page.

Afternoons

Letters, lists and errands.

Evenings

Sketching until the lamp goes on.

Seven more

A spiral, a row of loops, a wave, and the marks of a proofreader: cross, asterisk, ring and tick.

  • spiral
  • loops
  • waves
  • cross
  • asterisk
  • ring
  • tick

Red pen

A tick, a ring, an asterisk and a cross, scaled down and set beside a to-do list.

  • Buy more blue pens
  • Finish the draft by Friday
  • Ask about the old notebook
  • Paint the shed

Testing the pen

The first page of a new notebook: a spiral, loops, a wave and a zigzag, on ruled paper.

Testing the new pen

Works. Smooth, too.

In the margins

Marks around a paragraph, as if someone had read it with a pen in hand.

Read slowly, the whole page is drawn in the margins as well: a star where something was important, a tick where it checked out, and a ring round the one line worth coming back to. Nobody drew them to be looked at. They are the sound of someone reading with a pen in hand.

API reference

kind
default "zigzag"
"zigzag" | "corner" | "star" | "slash" | "spiral" | "loops" | "waves" | "cross" | "asterisk" | "ring" | "tick"

Which scribble: the ones a pen makes while it gets going (zigzag, corner, star, slash, spiral, loops, waves), or a proofreader's marks (cross, asterisk, ring, tick).

scale
default 1
number

Size; the line stays the same weight.

rotate
default 0
number

Degrees.

delay
default 0
number

ms after it comes into view before the pen starts.

color
default "ink"
"ink" | "red"

The ink, or the red pen.

flip
default false
boolean

Mirror it, so the same scribble can lean the other way.

retrace
number

0 to 1: how much of it the pen goes back over. Each kind has its own habit (a spiral none, a zigzag most of it).

weight
default 1
number

Line weight multiplier. Also settable in CSS as --ink-weight.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, weight and speed, as props or from the nearest InkProvider. What each one does.