Skip to content
Ballpoint

Section Heading

A section title in block capitals, written in by hand and underlined with a swoosh, with a few specks where the pen lifted.

Only in Ballpoint

Projects

A component library drawn in blue ballpoint, a fighting game in the browser, and a model picker for the command line.

Installation

pnpm dlx shadcn@latest add @ballpoint/section-heading

Usage

tsx
import { SectionHeading } from "@/components/ui/section-heading"

<section aria-labelledby="projects">
  <SectionHeading id="projects" specks>Projects</SectionHeading>
</section>

Examples

Levels and sizes

The element sets the level; className sets the size. A delay lets the pen land after the page does.

Notebook

Chapter one

A smaller aside

Written a beat later

Six underlines

Swoosh, double, wave, zigzag, loop and flick. Left alone, the seed picks one for each title.

  • swoosh

  • double

  • wave

  • zigzag

  • loop

  • flick

A page title

A sentence-case page title with a subtitle, and a section heading under it.

Field notes

Ninety-six pages, mostly about birds.

Chapter one

In which the pen runs out, and a heron does not care.

API reference

as
default "h2"
"h1" | "h2" | "h3" | "h4"

The heading level.

id
string

The heading's id, for aria-labelledby and links. Also seeds the drawing.

specks
default false
boolean

A few scratches beside the swoosh, where the pen was lifted.

delay
default 0
number

ms after it scrolls into view before the pen starts.

underline
"swoosh" | "double" | "wave" | "zigzag" | "loop" | "flick"

Which underline. By default the seed picks one, so each title keeps its own.

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.