Authoring

Actions and spans

Buttons, links and styled runs of text — the two built-in inline components, action rows, links in prose and the kit's span classes.

Two inline components make an email actionable: :button for the one thing the reader should do, and :link for everything else. They are built into the engine, in every kit (D40). The kit decides how they look, through the action block in its blocks.html, and how many a template may use. Spans style a run of text with the classes the kit declares.

plain/samples/receipt-free.md#L31-L31
:button[Download invoice]{href="{{invoice_url}}"} :link[Billing settings]{href="https://example.com/billing"}

Your receipt for order EX-1042

From: Example <hello@example.com>

Profile: default
375 px · mobile

Add a button

:button[Label]{href="…"} is the primary action. Plain draws it as a square filled button; Quiet as a pill with a VML fallback, so it stays a button in Outlook for Windows.

  • On its own. A :button in a paragraph with other text is :button must stand alone in its paragraph. Put it on its own line, alone or with other actions.
  • Where actions are allowed. It sits in an action row, and only components whose content allows actions take one. See Build an action row.
  • Within the kit's limits. Quiet allows one :button per template (more than one :button in the template) and none in a letter (letter: :button is not allowed here). Plain sets no limits.

Plain also has a ::button{href="…" label="…"} block component: a full-width button on phones, on a row of its own. It is a kit component like any other, with its own schema, and doesn't count as a :button.

:link[Label]{href="…"} is a text link. How it renders depends on where it is:

  • In an action row, it is the kit's secondary action: bold, in the accent colour, with an arrow. Plain appends →, Quiet ›. A label that already ends in › gets no arrow added.
  • In running text, it is an ordinary link with no arrow, styled by the kit's inline.link — the same as [Label](…).
templates/fees.md
We're lowering commission on services, as :link[the policy]{href="https://example.com/policies/fees"} explains.

:link[Read the full policy]{href="https://example.com/policies/fees"}

The first :link is inline; the second is alone in its paragraph, so it forms an action row. Both count against a kit's link limit.

Write the label and href

Both components take exactly one attribute, href, and a label:

RuleApplies toError
href is required and not empty.every :button and :link:link: missing href
No other attributes.every :button and :link:link: unknown attribute "target"
The label is required.actions in an action row:button: missing label
The label is plain text and merge tags only — no emphasis, code or links.actions in an action row:link: label must be plain text

A :link inside running text is an ordinary link, so its label is inline Markdown like any link text (:link[**bold**]{href="…"} compiles there).

href can hold merge tags. How their values are escaped, and which URLs are accepted at render, is in Know how URLs are escaped. A tag in a label is printed like any other merge tag, as in the tutorial kit's :button[Pay {{invoice.total}}]{href="{{pay_url}}"}.

Build an action row

A paragraph made only of :button and :link components, separated by spaces or line breaks, is an action row. It is a Markdown block of its own kind, actions, and a component takes one only when its schema's content.allow lists actions:

KitComponents that take action rows
Plainsection (so loose Markdown) and column
Quietstatement, actions (exactly one row) and letter (links only)

Anywhere else it is an error at the row, such as notice: action row is not allowed here. The kit's actions block lays the row out: side by side in Plain, stacked full width on phones in Quiet's statement and actions.

In the plain-text part, each action becomes its label with a colon, then its URL on the next line. From Plain's receipt sample:

01-receipt-free.txt
Download invoice:
https://example.com/invoices/EX-1042

Billing settings:
https://example.com/billing

Inside paragraphs, list items and table cells, use ordinary Markdown links:

templates/reset.md
If you keep getting these, [secure your account]({{security_url}}).
Write to <help@example.com> or see <https://example.com/help>.
  • [text](url): the destination can hold merge tags. A link title ([text](url "title")) is an error unless the component opts in with content.inline: [link_title]; neither shipped kit does (section: link titles are not allowed).
  • <https://…>: an autolink shows the address as its text.
  • <name@example.com>: an email autolink becomes a mailto: link.
  • :link[text]{href="…"} in a sentence is the same as [text](…).

In the plain-text part, lttr writes a link as text (url), as the URL alone when the text is the URL, or as the address alone for an email autolink. A kit's inline text define can wrap that text.

Style text with spans

[text]{.class …} wraps inline Markdown in a style. The classes are the kit's own, declared under spans in kit.yaml, each setting a colour, a font, a size or a weight:

ClassPlainQuiet
.mutedThe muted text colour.The secondary text colour.
.accentThe accent colour.—
.teal—The action colour. Wins over .muted if both are set.
.monoThe monospace font.The monospace font.
.small13 px type.13 px type.
.boldBold weight.Bold weight.
templates/courier-job.md
::breakdown
| Delivery fee | [**{{fee}}**]{.teal} |
| --- | ---: |
| [Payment]{.small .muted} | [Buyer paid in app]{.small .muted} |
::

A class the kit doesn't declare is a compile error, unknown span class ".red", and a span accepts no #id or key=value (span: unknown attribute "#id"). The styles apply to the HTML part only; the plain-text part shows the text.

Spans are the only place a class may go. {.small} directly after a code span, a link or emphasis is attributes are only allowed on spans and inline components, so wrap the element in a span: [`{{order_id}}`]{.small}.

Next steps

Copyright © 2026