Components

Scribble

Words scribbled out with tight back-and-forth strokes, like a note someone changed their mind about. A look, not a redaction: the text underneath stays in the DOM.

Install

terminal
npx shadcn@latest add @wobko/scribble

First time here? Add the registry to components.json first. How to install

Examples

Default

A word scribbled out in ink. The strokes lean, vary in pitch and spill past the letters.

Pens

Ink brush, a fine liner that leaves the words readable, red felt, blue felt and soft pencil: one change of mind each.

An edited draft

Scribbles, strikes and a highlight on the same page: an editor's pass over a paragraph.

API reference

Scribble

A <span> (or your own element with asChild) that hosts a scribble per line, in front of the words.

PropTypeDefaultDescription
tone"ink" | "red" | "blue" | "green" | "pencil" | "marker" | "orange""ink"The pen.
weight"fine" | "regular" | "brush""regular"Fine scribbles are light and leave the words legible; regular and brush are dense.
animatebooleanfalseScribble it out the first time it scrolls into view.
showbooleantrueShow or hide the scribble.
delaynumber-Milliseconds to wait before scribbling.
seedstring | number-Pins the hand.
asChildbooleanfalseRender the scribble on your own child element.

Accessibility

  • Never scribble out a secret: the text is still in the DOM, still selectable, still read by a screen reader. Remove sensitive text from the page instead.
  • The drawing is aria-hidden and pointer-events-none. Before it exists, and in Windows high contrast, the browser's own line-through is shown.

Source

The files the CLI copies into your project.

Loading the source