Sheet & Heading
The paper everything sits on, and the lettering that labels it.
Server or clientWCAG AASince v0.1
Live example
Status timeline
A sheet of paper, taped on. Everything inside is printed on paper.
import { Sheet, Heading, Lettering } from "@plop-ui/react";
<Heading level={2}>Status timeline</Heading>
<Sheet tape="periwinkle">…</Sheet>
<Lettering amp={2}>Hand-lettered label</Lettering>Change every prop live in the playground.
Props
Sheet
| Prop | Type | Default | What it does |
|---|---|---|---|
| children | ReactNode | none | What sits on the paper. |
| tape | "none" | "mustard" | "mint" | "periwinkle" | "bubblegum" | mustard | Color of the two tape strips holding it down, or none. |
| tilt | number | 0 | A slight rotation in degrees. |
Also takes every attribute of <div> (277 more, e.g. onClick, className, aria-*).
Heading
| Prop | Type | Default | What it does |
|---|---|---|---|
| childrenrequired | ReactNode | none | The heading text. Plain text gets lettered; anything else renders as is. |
| className | string | none | Extra class on the heading element. |
| id | string | none | Id of the heading element, e.g. for anchor links. |
| level | 2 | 3 | 4 | 1 | 2 | h1 to h4. |
| scribble | boolean | true for h1/h2 | Tomato scribble underline. |
| writeOn | boolean | true for h1/h2 | Letters write on when the heading scrolls into view. |
Lettering
| Prop | Type | Default | What it does |
|---|---|---|---|
| childrenrequired | ReactNode | none | The text to letter. Anything that isn't a string or number renders untouched. |
| amp | number | 2 | How wobbly: roughly the max tilt in degrees. |
| className | string | none | Extra class on the wrapper span. Not applied when children isn't a string or number. |
| writeOn | boolean | false | Letters start hidden and write on when data-in is set on this element (see Heading). |
Use it well
DoUse lettering for short labels and headings.
Don'tLetter whole paragraphs. Body text stays upright and readable.
Accessibility
- Lettering gives screen readers the plain text once; the jittered letters are hidden.
- Headings render fully written on the server and write on only after JavaScript loads.