# Book chapter

Book chapter renders a single chapter within an ebook or book route. Use for long-form book content with a chapter heading, optional subheading, and rich text body.

## What it looks like

![Book chapter default](../screenshots/components/book-chapter-default.png)

A full-width article block with optional `h2`-styled chapter heading, optional post-heading paragraph, and merged rich text body (`rtf-article`). The section has no background colour wrapper; content sits in `container-row-1-8` / `container-row-6-8`. Chapter anchor IDs are derived from `anchor` or slugified `heading` for in-page navigation.

## Typography

- **Heading:** `h2` class on semantic `<h1>` (chapter title).
- **Post-heading:** `p1 text-neutral-700`.
- **Body:** `rtf-article` (or overridden `bodyClassName` on book routes).

## Colours

No section-level `backgroundColour` / `textColour` on this component — `noBackground` section.

## Used fields

| Field | Type | Effect when set | Effect when empty/removed |
|-------|------|-----------------|---------------------------|
| `heading` | Symbol | Chapter title; also used for anchor slug if `anchor` empty | No heading |
| `postHeading` | Symbol | Subheading below title | No post-heading |
| `body` | RichText | Primary chapter copy | No body |
| `additionalCopy` | RichText | Appended after body in one RTF stream | Ignored if body empty |
| `anchor` | Symbol | HTML `id` for chapter link targets | Falls back to slugified heading |
| `cmsLabel` | Symbol | Internal label | No visible effect |

## Behaviour

- **Body merge:** `additionalCopy` is appended to `body` before render.
- **Anchors:** `id={anchor || slugifyChapterHeading(heading)}` on the `<article>` for TOC jumps.
- **Showcase:** Included in showcase mocks; used on `/resources/books/` chapter pages.

## Impact of content changes

| Change | Result |
|--------|--------|
| Edit heading | Chapter title and default anchor update |
| Add/remove body | Chapter content appears or disappears |
| Set anchor | TOC links target the explicit id |

## Screenshots to capture

Recommended variants: default (see accepted-variants `book-chapter.json`).