A container that applies typographic defaults to raw HTML content, restoring margins, list styles, heading sizes, and other block-level formatting that the Dialtone reset strips away.

Preview

Usage

Prose is a container for pre-rendered HTML content that needs sensible typographic defaults — markdown output, CMS pages, AI-generated responses, help articles, or any block of "raw" HTML that was not authored with Dialtone components, styles, or utility classes.

Style is stripped down and scoped so that elements start from a clean slate. Prose restores those defaults within a scoped container, so content reads naturally without requiring classes on any inner element.

Do

  • Wrap rendered markdown, CMS output, or any pre-rendered HTML that you do not control.
  • Use for long-form prose-like content blocks: help articles, changelogs, etc.
  • Let Prose handle all inner styling — pass plain HTML with no classes or inline styles.

Don’t

  • Wrap Dialtone components or interactive UI — Prose is purely for static and raw HTML structures.
  • Add class or style attributes to elements inside Prose — they will be stripped.
  • Place form elements (<input>, <select>, <button>) inside Prose — use proper Dialtone form components instead.
  • Nest a Prose container inside another Prose container.
  • Use Prose as a general-purpose "reset" — it is specifically designed for article-like content.

Content validation

DtProse enforces that slot content stays "pure" HTML:

  • Disallowed elements — Form controls (<input>, <select>, <textarea>, <button>, etc.) and custom elements (any hyphenated tag name like <dt-button>) produce a console.error. The one exception is <input type="checkbox"> inside <li> for task-list patterns.
  • Dialtone components — Any Vue component inside the slot will have their attributes stripped and trigger a console error. DtProse is designed for plain HTML only — use Dialtone components outside of Prose.
  • Attribute stripping — On elements inside the slot, non-essential attributes (class, style, data-*, event handlers) are silently removed. Structural and accessibility attributes (id, href, src, alt, scope, lang, dir, etc.) are preserved. Attributes on <dt-prose> itself are unaffected.

This is a development-time guardrail, not a security boundary. XSS protection is the responsibility of whoever produces the HTML.

Supported elements

Prose styles the full set of content HTML elements:

Category Elements
Headings h1h6, with <small> subtext
Text blocks p, blockquote, pre, hr
Inline formatting strong, em, code, kbd, mark, small, sub, sup, abbr, var, samp, dfn, del, ins, s, u, q
Links a with hover, active, and focus-visible states
Lists ul, ol, dl/dt/dd, task lists
Tables table, thead, tbody, th, td, caption
Media img, figure/figcaption
Interactive details/summary
Code pre > code blocks, inline code

Variants

Size

Shift the entire typography scale via the size prop. Headings, body text, code, and spacing all adjust proportionally.

Density

Control line-height independently from size via the density prop. Useful for tuning readability in different contexts.

Examples

Headings and paragraphs

All six heading levels maintain a clear visual hierarchy with balanced spacing between sections, making long documents easy to scan.

Inline elements

Rich inline formatting including bold, italic, code, keyboard shortcuts, highlights, and links are all styled to be visually distinct without disrupting the reading flow.

Unordered list

Unordered lists support nesting, each with a distinct marker style (disc, circle, square) so readers can track depth at a glance.

Ordered list

Ordered lists use decimal numbering with lower-alpha and lower-roman for nested levels, preserving sequence clarity in step-by-step instructions.

Mixed list

Unordered and ordered lists can be freely nested inside each other, with each level retaining its own marker style.

Blockquote

Blockquotes are visually offset with an inline-start (aka left) border and muted color, supporting multi-paragraph content, nesting, and attributed citations.

Code blocks

Preformatted code blocks preserve whitespace and use a monospace font on a subtle background, clearly separating code from surrounding prose.

Table

Prose tables are fully styled with borders, header separation, and row-scoped headers.

Definition list

Definition lists pair terms with descriptions, useful for glossaries, metadata tables, and structured key-value content.

Details and summary

Collapsible sections useful for FAQs, supplementary information, or long reference content.

Task list

Checkboxes inside list items are the one exception to the "no form elements" rule, supporting the common markdown task-list pattern.

Accessibility

  • Prose renders as a plain <div> with no implicit ARIA role. Add role="article" or wrap in an <article> element upstream if the content represents a self-contained composition.
  • All heading levels (h1h6) maintain their native semantics and document outline contribution.
  • Links receive visible focus indicators via box-shadow: var(--dt-shadow-focus).
  • Abbreviations (<abbr title="...">) display a dotted underline and cursor: help.
  • Tables use semantic <thead>, <th scope>, and visible borders for screen-reader navigability.

Vue API

import { DtProse } from '@dialpad/dialtone-vue';

Slots

Name
Type
default

Default slot for raw HTML content

Props

Name
Default
Type
density
200
"100" | "200" | "300"

The density (line-height) of prose content.

size
300
"100" | "200" | "300"

The size of the prose typography scale.

Prose documentation last updated Thursday, June 18, 2026