Prose
<caos-prose>
a block of authored words, set to a readable measure, for a page whose content IS the text
May be placed on an app’s home page, a page inside an app, a record page and a step of a guided flow.
Inputs
Section titled “Inputs”| Name | Attribute | Description | Type | Default | Required |
|---|---|---|---|---|---|
heading |
heading, markup only |
An optional heading above the prose. Unset, no heading element is drawn at all — rather than an empty one, which would still be a heading in the document outline and would read as a blank entry to a screen reader. | text | none declared | Optional |
level |
level, markup only |
Which level the heading is. h3 by default, because both renderers already put a heading above this one: the site renderer emits the page label as an h1 and each section name as an h2, and an internal surface draws a page header. Taking h2 here would put two h2s at different depths in one document, which reads as two sibling sections rather than a section and the block inside it. |
text — one of h2, h3, h4 | h3 | Optional |
body |
body, markup only |
The prose. Paragraphs are separated by a blank line and each one is set as TEXT — no markup is interpreted, because this piece is drawn on anonymous public pages from authored metadata. Ignored when anything has been slotted in, since the kernel’s site renderer supplies the same words as light-DOM children and rendering both would print them twice. | text | none declared | Optional |
Events
Section titled “Events”This piece raises no events.
| Name | What goes in it |
|---|---|
| the default slot | The paragraphs, when they are supplied as content rather than through the body input. This is the path a public page takes: the site renderer writes the words into the document as paragraphs so the page reads with JavaScript off, and this piece styles them in place rather than redrawing them. That renderer echoes EVERY input as a paragraph, not only the prose, so a paragraph naming an input other than body is hidden once this piece upgrades — the heading is already drawn as a heading, and the level as its tag. |
Styling hooks
Section titled “Styling hooks”| Design token | What it controls |
|---|---|
--caos-measure-document |
The reading width. The point of the piece: a documentation paragraph run full-width across a wide page is what makes long-form text unreadable. |
--caos-font |
The typeface the prose is set in. |
--caos-text-body |
The size of the prose, and the size the heading is scaled from. |
--caos-font-weight-body |
The weight of the prose. |
--caos-font-display |
The typeface of the heading. |
--caos-font-weight-display |
The weight of the heading. |
--caos-color-text |
The ink of both the heading and the prose. |
--caos-space-3 |
The gap between one paragraph and the next. |
--caos-space-2 |
The gap under the heading. |
--caos-color-accent |
A link inside the prose. The accent rather than a link token of its own, because the platform scale has none and a component may not read a name the design system does not define. |
Methods
Section titled “Methods”Nothing else drives this piece by calling it.
Readable state
Section titled “Readable state”Nothing on this piece can be read back.
Styling parts
Section titled “Styling parts”| Part | Which piece of it | When it is there |
|---|---|---|
::part(prose) |
the block as a whole, including its reading measure | Always |
::part(heading) |
the heading line | Always |
::part(body) |
the paragraphs | Always |
When to use it
Section titled “When to use it”The content of the surface IS the text — a documentation page, an about page, a landing section, or a standing explanation above a record’s fields. Reach for it whenever words are the deliverable rather than the label on something else.
What to use instead
Section titled “What to use instead”- InlineHint — The note explains ONE field and belongs under it, in muted text. That piece is sized and coloured to sit beneath a control without competing with it; a prose block there reads as page content that has fallen into the form.
- NoticeBanner — The text is a CONDITION the surface is in and wants a decision or must not be missed. A banner is tinted, full-width and dismissable for that reason. Prose is content; a banner qualifies content.
- DetailSection — The block is the fields of a record grouped under a title, not sentences. That piece draws the group; this one would only describe it.
- SummaryPanel — The words are GENERATED from a record by the Summarize capability and their claims carry citations back into it. That panel owns the citation behaviour; prose is authored text with nothing to cite.
- CodeEditor — The content is a code sample a reader may edit or run. Prose sets sentences at a reading measure in the body typeface, which is the wrong shape for code and loses its whitespace.
Accessibility
Section titled “Accessibility”The heading is a real heading element and its LEVEL is the level input, because a heading’s tag is its level to assistive technology and cannot be faked with styling — which is why this piece retags the element rather than restyling one fixed tag. A block with no heading draws no heading element, so the document outline never carries a blank entry. The prose is ordinary paragraphs either way, so it is navigable by paragraph and selectable as text. Left to the author: choosing a level that follows the heading above it rather than the size that looks right, and keeping the words in the body input or the slot rather than folding them into the heading.
Examples
Section titled “Examples”A documentation page
Section titled “A documentation page”The case the piece was built for: a heading and two paragraphs that ARE the page, set to a reading measure rather than the width of the window.
{ "id": "example", "section": "A documentation page", "columns": 1, "items": [ { "id": "prose_1", "type": "component", "key": "prose", "inputs": { "heading": "What a metatype is", "body": "A metatype is the platform's own description of a kind of metadata. An object, a field, a page and a permission set are each a metatype, and each one is a schema the platform validates every deploy against.\n\nThat is why a change to the platform cannot quietly widen what an org may author: the schema is the contract, and a deploy that does not satisfy it is refused rather than accepted and worked around." } } ]}<caos-prose heading="What a metatype is" body="A metatype is the platform's own description of a kind of metadata. An object, a field, a page and a permission set are each a metatype, and each one is a schema the platform validates every deploy against.
That is why a change to the platform cannot quietly widen what an org may author: the schema is the contract, and a deploy that does not satisfy it is refused rather than accepted and worked around."></caos-prose>Prose with no heading
Section titled “Prose with no heading”A block that continues under a heading something else already drew — a section name, or the page title. No heading element is drawn at all, so the outline stays clean.
{ "id": "example", "section": "Prose with no heading", "columns": 1, "items": [ { "id": "prose_1", "type": "component", "key": "prose", "inputs": { "body": "Every org gets a primary hostname when it is provisioned, in the same transaction as the org itself, because an org committed without one is unroutable whatever DNS says." } } ]}<caos-prose body="Every org gets a primary hostname when it is provisioned, in the same transaction as the org itself, because an org committed without one is unroutable whatever DNS says."></caos-prose>The three heading levels
Section titled “The three heading levels”h2, h3 and h4 side by side. The default is h3, which is the level a block inside a section actually sits at — pick the one that follows the heading above it, not the size that looks right.
{ "id": "example", "section": "The three heading levels", "columns": 1, "items": [ { "id": "prose_1", "type": "component", "key": "prose", "inputs": { "level": "h2", "heading": "A section of a page", "body": "Set the level from the document, not from the size you want." } }, { "id": "prose_2", "type": "component", "key": "prose", "inputs": { "level": "h3", "heading": "A block inside that section", "body": "This is the default, and the one most blocks want." } }, { "id": "prose_3", "type": "component", "key": "prose", "inputs": { "level": "h4", "heading": "A point inside that block", "body": "Below this, prose with no heading is usually the better shape." } } ]}<caos-prose level="h2" heading="A section of a page" body="Set the level from the document, not from the size you want."></caos-prose><caos-prose level="h3" heading="A block inside that section" body="This is the default, and the one most blocks want."></caos-prose><caos-prose level="h4" heading="A point inside that block" body="Below this, prose with no heading is usually the better shape."></caos-prose>Words supplied as content
Section titled “Words supplied as content”The path a public page takes. The site renderer writes the paragraphs into the document itself so the page reads before its bundle arrives; the piece styles them where they are and ignores the body input, which carries the same words.
{ "id": "example", "section": "Words supplied as content", "columns": 1, "items": [ { "id": "prose_1", "type": "component", "key": "prose", "inputs": { "heading": "Served before the bundle arrives" }, "children": [ "A public page is rendered on the server and cached at the edge, so the words have to be in the markup rather than drawn by script." ] } ]}<caos-prose heading="Served before the bundle arrives">A public page is rendered on the server and cached at the edge, so the words have to be in the markup rather than drawn by script.</caos-prose>