Anfrage
Probetraining für unseren Sohn
Von: Martina Keller <[email protected]> · heute, 08:23
Guten Tag
Unser Sohn Luca (7) möchte gerne Taekwondo ausprobieren. Wann könnten wir zu einem Probetraining kommen?
Freundliche Grüsse
Martina Keller
Data displaybeta.message
One email, incoming or outgoing: sender, recipient, subject and the plain-text body with its line breaks.
Shows an email the way the recipient reads it: an inquiry a parent sent, the reply the club is about to send (in a flow's review) or sent earlier (in the history). direction marks which side wrote it: in is a neutral surface, out gets an accent edge and the label "Antwort".
The body is plain text; line breaks and blank lines are kept exactly (lists like "– Montag, 17:00" stay readable), long words and URLs wrap. It is never HTML: a message from outside the club cannot inject markup.
Use it to show, not to edit. The reply is edited in a field with control: "textarea"; the review then shows it again as a message so the person sees exactly what goes out.
render({
"label": "Anfrage",
"from": "Martina Keller <[email protected]>",
"dateLabel": "heute, 08:23",
"subject": "Probetraining für unseren Sohn",
"body": "Guten Tag\n\nUnser Sohn Luca (7) möchte gerne Taekwondo ausprobieren. Wann könnten wir zu einem Probetraining kommen?\n\nFreundliche Grüsse\nMartina Keller"
})<article class="message" data-direction="in" aria-labelledby="message-by7yuu">
<p class="message__label"><svg class="icon" data-size="sm" aria-hidden="true"><use href="../../packages/ui/icons/icons.svg#user"/></svg>Anfrage</p>
<header class="message__head">
<p class="message__subject" id="message-by7yuu">Probetraining für unseren Sohn</p>
<p class="message__meta"><span class="u-visually-hidden">Von: </span><strong>Martina Keller <[email protected]></strong> · heute, 08:23</p>
</header>
<div class="message__body">Guten Tag
Unser Sohn Luca (7) möchte gerne Taekwondo ausprobieren. Wann könnten wir zu einem Probetraining kommen?
Freundliche Grüsse
Martina Keller</div>
</article>render({
"direction": "out",
"label": "So geht die Antwort raus",
"from": "Taekwondo Bern <[email protected]>",
"to": "Martina Keller <[email protected]>",
"subject": "Re: Probetraining für unseren Sohn",
"body": "Liebe Familie Keller\n\nVielen Dank für eure Nachricht! Wir schlagen euch dieses Probetraining vor:\n– Montag, 19. Oktober, 16:00–16:50, Dojang Muri\n\nLiebe Grüsse\nSandra"
})<article class="message" data-direction="out" aria-labelledby="message-1rielpu">
<p class="message__label"><svg class="icon" data-size="sm" aria-hidden="true"><use href="../../packages/ui/icons/icons.svg#mail"/></svg>So geht die Antwort raus</p>
<header class="message__head">
<p class="message__subject" id="message-1rielpu">Re: Probetraining für unseren Sohn</p>
<p class="message__meta"><span class="u-visually-hidden">Von: </span><strong>Taekwondo Bern <[email protected]></strong></p>
<p class="message__meta">An: Martina Keller <[email protected]></p>
</header>
<div class="message__body">Liebe Familie Keller
Vielen Dank für eure Nachricht! Wir schlagen euch dieses Probetraining vor:
– Montag, 19. Oktober, 16:00–16:50, Dojang Muri
Liebe Grüsse
Sandra</div>
</article>What render(data) accepts — validated against this JSON Schema in development and tests. Unknown fields are rejected. The same schema is in components.json.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
direction | "in" | "out" | optional | "in" | in: written to the club (inquiry). out: written by the club (reply, confirmation). |
label | string | optional | — | Small label above the header, e.g. "Anfrage", "Deine Antwort", "Gesendet von Sandra". Default: "Nachricht" (in) / "Antwort" (out). |
from | string | optional | — | Sender as shown, e.g. "Martina Keller <[email protected]>". Required unless bare.min 1 chars |
bare | boolean | optional | false | Only the text (line breaks kept, clamp and toggle work), no frame, label or header — inside a card or section that already says who wrote it. |
to | string | optional | — | Recipient as shown; usually only for outgoing mail. |
dateLabel | string | optional | — | When it was sent or received, as display text ("heute, 08:23"). |
subject | string | optional | — | Subject line. |
body | string | required | — | Plain-text body; line breaks are kept. min 1 chars |
clamp | integer | optional | — | Show at most about this many lines; longer messages get «Ganze Nachricht anzeigen» (no script: a <details> toggle). Use it where the message is context for a task, e.g. above a reply.≥ 3 |
moreLabel | string | optional | "Ganze Nachricht anzeigen" | Label of the toggle for clamped messages. |
{
"type": "object",
"additionalProperties": false,
"required": [
"body"
],
"properties": {
"direction": {
"type": "string",
"enum": [
"in",
"out"
],
"default": "in",
"description": "`in`: written to the club (inquiry). `out`: written by the club (reply, confirmation)."
},
"label": {
"type": "string",
"description": "Small label above the header, e.g. \"Anfrage\", \"Deine Antwort\", \"Gesendet von Sandra\". Default: \"Nachricht\" (in) / \"Antwort\" (out)."
},
"from": {
"type": "string",
"minLength": 1,
"description": "Sender as shown, e.g. \"Martina Keller <[email protected]>\". Required unless `bare`."
},
"bare": {
"type": "boolean",
"default": false,
"description": "Only the text (line breaks kept, clamp and toggle work), no frame, label or header — inside a card or section that already says who wrote it."
},
"to": {
"type": "string",
"description": "Recipient as shown; usually only for outgoing mail."
},
"dateLabel": {
"type": "string",
"description": "When it was sent or received, as display text (\"heute, 08:23\")."
},
"subject": {
"type": "string",
"description": "Subject line."
},
"body": {
"type": "string",
"minLength": 1,
"description": "Plain-text body; line breaks are kept."
},
"clamp": {
"type": "integer",
"minimum": 3,
"description": "Show at most about this many lines; longer messages get «Ganze Nachricht anzeigen» (no script: a `<details>` toggle). Use it where the message is context for a task, e.g. above a reply."
},
"moreLabel": {
"type": "string",
"default": "Ganze Nachricht anzeigen",
"description": "Label of the toggle for clamped messages."
}
}
}Root: article.message — usable without render() by writing the markup directly.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-direction | in | out | — | Who wrote it; out adds the accent edge. |
| Part | Description |
|---|---|
.message__label | Small label with icon ("Anfrage", "Antwort"). |
.message__head | From, to, date and subject. |
.message__body | Plain text, white-space: pre-wrap. |
.message[data-clamp] / .message__more | Clamped body (--message-lines) with a <details> toggle that lifts the clamp. |
<article> labelled by its subject (or sender), so screen readers can jump between messages.Related: Coach note · Card · Form field