Kern GitHub

Prose

Rich text wrapper for Bard or markdown output, mapped to Kern typography and color tokens.
Prose is for rendered Bard or markdown content. It keeps rich text inside Kern's token system: headings stay near-black and bold, links use primary blue with a visible underline at rest, and code samples use the mono stack with muted surfaces.

Rich content

Publishing accessible content

Prose wraps Bard or markdown output so long-form content inherits Kern's typography, color, and link rules. Every body link, like this content checklist, remains visibly underlined.

What the editor should check

  • Use headings in order so screen-reader users can navigate by structure.
  • Keep link text descriptive instead of writing “click here”.
  • Reserve muted text for secondary information only.
  1. Draft the content.
  2. Preview the rendered page.
  3. Ship after keyboard and screen-reader checks.
Good prose is interface design: it tells people what happened, what matters, and what they can do next.

Inline code such as content | markdown uses the mono stack and muted background, matching larger code samples.

composer require marcorieser/tailwind-merge-statamic
npm install @tailwindcss/typography
Element Kern treatment
Links Primary blue, underlined at rest, thicker on hover.
Code JetBrains Mono with muted background.
1{{ partial:docs/previews/primitives/prose /}}

Props

Name Type Default Description
as string div Root HTML element
class string Additional classes merged via tw_merge (root element only)

Slots

Name Fallback / Default Description
default Rich content rendered inside the prose wrapper

Source

1{{#
2 @name Prose
3 @desc Rich text wrapper for Bard or markdown output, mapped to Kern typography and color tokens.
4 @param as string [div] - Root HTML element
5 @param class string - Additional classes merged via tw_merge (root element only)
6 @slot default - Rich content rendered inside the prose wrapper
7#}}
8{{ _el = as ?? 'div' }}
9{{ _class = 'prose {class}'
10 | tw_merge }}
11<{{ _el }} class="{{ _class }}">
12 {{ slot }}
13</{{ _el }}>

Dependencies

Packages

1composer require marcorieser/tailwind-merge-statamic