Typography

Preset text components with optional hand-drawn underlines, highlights, and rules.

Sketch journal

Lead paragraph with doodle typography.

Body copy with an

inline highlight and
inline code
.

Ideas look better when the border wobbles.
<Heading level={2} accent="underline" roughness={1.5}>
  Sketch journal
</Heading>
<Text variant="lead">...</Text>

CLI install

npx doodleui-react add typography

Usage

import { Blockquote, Heading, Highlight, InlineCode, Text } from "doodleui-react";

<Heading level={1} accent="underline">Notes</Heading>
<Text variant="lead">A quick intro.</Text>
<Text>Marked <Highlight>important</Highlight> and <InlineCode>npm i</InlineCode>.</Text>
<Blockquote>Sketch borders optional.</Blockquote>

Props

PropTypeDefaultNotes
level1 | 2 | 3 | 4 | 5 | 62Heading renders as h1–h6.
accent"none" | "underline" | "highlight""none"Optional hand-drawn underline or marker behind Heading text.
animatebooleantrueDraw-in accent strokes on Heading, Blockquote, InlineCode, Highlight. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.