Skip to content
Ballpoint

The red pen

Paste a component and it comes back marked up the way a teacher marks a page: what makes it look styled rather than drawn, and how to fix it. It reads the code in your browser; nothing you paste leaves the page.

Mark a page

Start from a page an agent wrote without the craft, or paste your own.

9 corrections, 0 notes

This is shadcn in a handwriting font. Start with the red.

D
  1. import { Mail, Loader2 } from "lucide-reactDrawn icons"
  2. import { motion } from "framer-motionThe pen moves, the page doesn't"
  3. import { Button } from "@/components/ui/button"
  4. import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
  5. import { Input } from "@/components/ui/input"
  6. export function Login() {
  7. return (
  8. <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }}>
  9. <Card className="w-96 rounded-2xlThe pen draws the box border shadow-lg">
  10. <CardHeader>
  11. <CardTitle className="font-serifOne hand text-2xl">Welcome back</CardTitle>
  12. <p className="text-sm text-gray-500One ink">Sign in to continue</p>
  13. </CardHeader>
  14. <CardContent className="space-y-4">
  15. <Input className="rounded-mdThe pen draws the box" placeholder="you@example.com" />
  16. <Button variant="destructive"The red pen is for mistakes className="w-full" onClick={() => count > 2 && go()}>
  17. <Mail /> Sign in
  18. </Button>
  19. </CardContent>
  20. </Card>
  21. </motion.div>
  22. )
  23. }

What to fix

  1. One ink. A ballpoint has one colour. The moment a blue-500 or a #6b7280 shows up the page stops being a drawing, and it stops following the look: a hand-picked grey fails contrast on half the papers.

    • 13:33 text-gray-500

    Fix: Swap the colour for a pressure: text-ink-2 for secondary, text-ink-3 for muted, text-pen-red only for destructive or invalid.

  2. The pen draws the box. A CSS border is a perfect line next to a wobbling one; it is the clearest tell that a screen wasn't drawn. A rounded-xl clips the stroke and a box-shadow sits under the hatched one.

    • 10:29 rounded-2xl
    • 10:41 border
    • 10:48 shadow-lg
    • 16:29 rounded-md

    Fix: Take the class off and use the pen: radius={12} or radius="full" for corners, variant="lifted" or shadow="solid" for a shadow, passes={2} for a heavier line.

  3. Drawn icons. A lucide icon is a uniform 2px vector line. Beside a pressured pen stroke it is the second tell, right after CSS borders.

    • 1:32 lucide-react

    Fix: Add @ballpoint/ink-icons and write <InkIcon name="check" />. The names follow lucide's where they can.

  4. The red pen is for mistakes. Everything else is one ink, so red is loud. Spend it on a delete and an error and the reader learns what it means; spend it on Upgrade and they stop trusting it.

    • 17:19 variant="destructive"

    Fix: A primary action is the solid default Button. Keep destructive for delete, remove, revoke, discard; text-pen-red for errors.

  5. One hand. The hand is part of the drawing. A second face reads as a different person writing on the same sheet.

    • 12:33 font-serif

    Fix: Take the font class off; change the face for the whole page by picking a look.

  6. The pen moves, the page doesn't. The strokes already respect reduced motion and draw in reading order. A spring on top fights the hand and breaks both.

    • 2:25 framer-motion

    Fix: Remove the library. For a lift or a settle, the components already have one; for content landing in turn, useInkStage().

From your agent

The same red pen is a tool on Ballpoint's MCP server and a command in the Claude Code plugin, so an agent can check its own work before it shows you. See Ballpoint for agents.

bash
/plugin install ballpoint --marketplace useit015/ballpoint
/ballpoint:critique src/app

The rules

Corrections (✗) are what the red pen goes through. Notes (·) are advice in the margin: usually right, sometimes exactly what you meant.

✗ One ink

Write everything in the one ink at different pressures: text-ink, text-ink-2 and text-ink-3 for quieter text, ink-4 and ink-5 for rules and washes, bg-paper for the page. No palette colours, no hex.

A ballpoint has one colour. The moment a blue-500 or a #6b7280 shows up the page stops being a drawing, and it stops following the look: a hand-picked grey fails contrast on half the papers.

Not thistsx
<p className="text-gray-500">Last edited 2 days ago</p>
Thistsx
<p className="text-ink-3">Last edited 2 days ago</p>

✗ The pen draws the box

Don't put CSS borders, rounded corners, shadows or rings on Ballpoint components. Their outline, corners and shadow are pen strokes: set them with pen settings (radius, corners, passes, shadow, fill), per component or for a region with InkProvider.

A CSS border is a perfect line next to a wobbling one; it is the clearest tell that a screen wasn't drawn. A rounded-xl clips the stroke and a box-shadow sits under the hatched one.

Not thistsx
<Card className="rounded-xl border shadow-md">…</Card>
Thistsx
<Card variant="lifted" radius={12}>…</Card>

· Draw boxes, don't style them

A plain div with rounded corners and a shadow is a card that wasn't drawn. Reach for Card, Frame or Paper, or a Separator for a rule.

Next to drawn components a CSS box reads as a hole in the page.

Not thistsx
<div className="rounded-lg shadow-sm p-6">…</div>
Thistsx
<Card className="p-6">…</Card>

✗ Room for the pen

Never put overflow-hidden on a Ballpoint component. The pen runs a little past every corner and a lifted box casts its shadow outside itself; clip an inner wrapper instead.

Clipped, the corners look open and the shadow is cut square: the drawing looks broken rather than drawn.

Not thistsx
<Card className="overflow-hidden">…</Card>
Thistsx
<Card><div className="overflow-hidden">…</div></Card>

· One radius

Corners come from one radius for the whole app (0, 6, 12 or full), set once with InkProvider or by the look. Don't give components their own.

A real hand has a habit: it rounds every corner about the same. Mixed radii read as parts from different kits.

Not thistsx
<Card radius={12}>…</Card>
<Button radius="full">Save</Button>
Thistsx
<InkProvider radius={12}>…</InkProvider>

· Straight quotes

Write ' and " in copy, not curly quotes. In JSX text, &apos; and &quot;.

In Gaegu a curly apostrophe is more than twice as wide as a straight one, so "didn’t" opens a gap in the middle of the word.

Not thistsx
<p>We couldn’t save your changes.</p>
Thistsx
<p>We couldn&apos;t save your changes.</p>

· A keyboard can scroll it

A region that scrolls on its own (overflow-auto or -scroll) needs tabIndex={0} and a name, or use ScrollArea, which has both.

Without focus, someone on a keyboard can see the region but never read the end of it.

Not thistsx
<aside className="h-dvh overflow-y-auto">…</aside>
Thistsx
<aside aria-label="The plan" tabIndex={0} className="h-dvh overflow-y-auto">…</aside>

✗ Drawn icons

Use InkIcon (or the glyphs Ballpoint components already draw), not an icon font or set. They take the ink, the hand and the draw-in.

A lucide icon is a uniform 2px vector line. Beside a pressured pen stroke it is the second tell, right after CSS borders.

Not thistsx
import { Check } from "lucide-react"
Thistsx
import { InkIcon } from "@/components/ui/ink-icons"

✗ The red pen is for mistakes

The red pen (variant="destructive", text-pen-red) means something will be lost or something is wrong. Not emphasis, not a sale, not a call to action.

Everything else is one ink, so red is loud. Spend it on a delete and an error and the reader learns what it means; spend it on Upgrade and they stop trusting it.

Not thistsx
<Button variant="destructive">Upgrade now</Button>
Thistsx
<Button>Upgrade now</Button>

· Specials are seasoning

Annotate, Scrawl and MarginNote make a screen's drawn moment. Gather them there, two or three to a screen, rather than sprinkling them everywhere.

One circled word gets read. Ten circled words are a sticker-bombed page and nothing gets read.

Not thistsx
<h1><Annotate type="circle">Fast</Annotate>, <Annotate type="underline">simple</Annotate>, <Annotate type="box">cheap</Annotate>, <Annotate type="highlight">yours</Annotate></h1>
Thistsx
<h1>Fast, simple, <Annotate type="underline">yours</Annotate></h1>

· Let the pen go in reading order

Leave draw on "auto": what comes into view together draws in reading order, each drawing starting as the one before gets going. Content with no drawing of its own takes its turn with useInkStage(). Use draw="mount" for the one thing above the fold that should not wait.

Everything on "mount" draws at once, which looks like a page loading, not a hand writing.

Not thistsx
<Card draw="mount">…</Card>
<Card draw="mount">…</Card>
<Card draw="mount">…</Card>
Thistsx
<Card draw="mount">…</Card>
<Card>…</Card>
<Card>…</Card>

· Pin seeds on lists

A drawing's wobble comes from its seed, which defaults to where it sits in the tree. Rows that are filtered, paginated or re-sorted are new each time, so pin seed to the row's id and each one keeps its hand.

Without it, the same item redraws differently every time a filter changes, and the page flickers into a new drawing.

Not thistsx
{plans.filter((plan) => plan.active).map((plan) => <Card key={plan.id}>…</Card>)}
Thistsx
{plans.filter((plan) => plan.active).map((plan) => <Card key={plan.id} seed={plan.id}>…</Card>)}

✗ One hand

The page is written in the look's face (Gaegu unless the look says otherwise), with font-mono for code. Regular and font-bold only. No serif, no second display face, never a marker or comic font picked on the side.

The hand is part of the drawing. A second face reads as a different person writing on the same sheet.

Not thistsx
<h1 className="font-serif text-4xl">Pricing</h1>
Thistsx
<h1 className="text-4xl font-bold">Pricing</h1>

✗ The pen moves, the page doesn't

Motion is the pen drawing in, and it is already there. No animation library, no JS-driven hover; CSS transitions on the ink-* variables if anything.

The strokes already respect reduced motion and draw in reading order. A spring on top fights the hand and breaks both.

Not thistsx
import { motion } from "framer-motion"
Thistsx
import { useInkStage } from "@/hooks/use-ink-box"

· Colours come from a look

To change the ink or the paper, pick or make a look (the customizer, or make_look over MCP) and install it. Don't set --ink or --paper by hand.

A look presses the ink only as hard as the paper needs to pass WCAG AA, by day and by night, and moves every pressure with it. A hand-set --ink passes on one paper and fails on the other.

Not thistsx
<div style={{ "--ink": "#1d4ed8" }}>
Thisbash
npx shadcn@latest add https://ballpoint.st9wd.com/r/style/ledger.json