Components

Squiggle

A hand-drawn divider: a wave, a zig-zag, a row of loops, scallops, dashes or dots, drawn to fit whatever width or height you give it. Same semantics as a separator.

Install

terminal
npx shadcn@latest add @wobko/squiggle

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

Examples

Default

A wavy line across the width, between two paragraphs.

Six kinds, and vertical

Wave, zig-zag, loops, scallops, dashes and dots; then the same patterns standing up.

Between sections of a card

A real separator (decorative={false}) that draws itself on when the card scrolls into view.

API reference

Squiggle

A <div> that fills its box with one drawn line along its long side. Full width and 16 px high by default; a vertical one is 16 px wide and as high as its container.

PropTypeDefaultDescription
kind"wavy" | "zigzag" | "loops" | "scallops" | "dashes" | "dots""wavy"The pattern of the line.
orientation"horizontal" | "vertical""horizontal"Along the width or the height of the box.
decorativebooleantruetrue: role="none", hidden from assistive technology. false: a real separator with aria-orientation.
tone"ink" | "blue" | "red" | "green" | "pencil" | "marker" | "orange""ink"The pen.
weight"fine" | "regular" | "brush""regular"Fine-liner, felt tip or brush.
animatebooleanfalseDraw the line on, along its length, the first time it scrolls into view.
showbooleantrueShow or hide it.
delaynumber-Milliseconds before the drawing starts.
seedstring | number-Pins the hand.

Accessibility

  • Decorative by default (role="none"), like Radix's Separator; pass decorative={false} to expose it as a separator (with aria-orientation) between sections that really are distinct.
  • The drawing is aria-hidden and pointer-events-none; it is redrawn when the box is resized. Windows high contrast hides it (a decorative divider loses nothing).
  • Cost grows with length: about 3 KB for 420 px in a single pull; keep very long dividers (over 1200 px) to `dots` or `dashes`.

Source

The files the CLI copies into your project.

Loading the source