# blocks/heading

> Heading 1–3 — `level` prop; the element is recreated only when the level changes.

Heading 1–3 (F-11) — `level` prop; the element is recreated only when the level changes. `# ` / `## ` / `### ` input rules, ⌘⌥1–3. Markdown: `#` prefix · HTML: `<h1>`–`<h3>` (h4–h6 paste as h3).

```js
import heading from 'verbal-editor/blocks/heading';
```

| JS gzip | CSS gzip |
| --- | --- |
| 0.56 KB | 0.16 KB |

See it live on [Writing](#/examples/welcome) — every example page on the landing is editable.

## Contract

|  |  |
| --- | --- |
| Block type | `heading` |
| Content | text with marks |
| Props | `level: 1 \| 2 \| 3` |
| Slash menu | `H1 Heading 1` `H2 Heading 2` `H3 Heading 3` |
| Keywords | `h1` `title` `heading` `h2` `h3` |
| Keys | `⌘⌥1` `⌘⌥2` `⌘⌥3` |
| Typing rules | `^(#{1,3})\s$` |
| Pastes from | `<h1>` `<h2>` `<h3>` `<h4>` `<h5>` `<h6>` `Markdown` |
| Copies as | `Markdown` `HTML` |

## Acceptance

| Feature | Acceptance | Budget |
| --- | --- | --- |
| F-11 · Headings 1–3 | `# ` input rule; `Mod-Alt-{1,2,3}`; round-trips to markdown | ≤ 1KB |
