Your order has been confirmed and will ship within two business days. We will email a tracking number to Ada Lovelace as soon as the package leaves the warehouse.
import { Text } from "@senvenli/react/display";
export default function Example() {
return (
<Text elementType="p">
Your order has been confirmed and will ship within two business days. We will email a tracking number to Ada Lovelace as soon as the
package leaves the warehouse.
</Text>
);
}import { Text, Prose } from "@senvenli/react/display";Examples
Sizes
Body by default; large for lead text, small for captions, code for identifiers.import { Text } from "@senvenli/react/display";
import { Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Stack space="space-100">
<Text size="body-large">Three invoices are due this week.</Text>
<Text>Three invoices are due this week.</Text>
<Text size="body-small">Three invoices are due this week.</Text>
<Text size="code">INV-2026-0318</Text>
</Stack>
);
}Tones
Subtle tones for secondary text; semantic tones only when the text carries that meaning.import { Text } from "@senvenli/react/display";
import { Stack } from "@senvenli/react/layout";
export default function Example() {
return (
<Stack space="space-100">
<Text weight="medium">Invoice INV-2026-0318</Text>
<Text tone="subtle">Issued to Ada Lovelace</Text>
<Text tone="subtlest" size="body-small">
Last edited March 18, 2026
</Text>
<Text tone="success">Paid in full</Text>
<Text tone="danger">Payment failed</Text>
{/* Figures that sit in a column or change in place line up with `isNumeric`. */}
<Text isNumeric>$1,240.00</Text>
</Stack>
);
}Long-form text
Prose styles rendered HTML or Markdown: headings, lists, quotes, code and links.import { Prose } from "@senvenli/react/display";
export default function Example() {
return (
<Prose>
<h2>Returns</h2>
<p>
You can return most items within <strong>30 days</strong> of delivery. Start from the order page and print the prepaid label.
</p>
<ul>
<li>Items must be unused and in their original packaging.</li>
<li>
Refunds go back to the original payment method, quoting the order ID, such as <code>ORD-1042</code>.
</li>
</ul>
<blockquote>
<p>Custom orders cannot be returned unless they arrive damaged.</p>
</blockquote>
</Prose>
);
}Guidelines
When to use it
- Any run of app text: descriptions, help text, captions, numbers.
- Prose: long formatted content such as articles or terms.
Use something else when
- The words title a page or section. Heading
Do and avoid
- Keep legal and body text at
bodyor larger; usesubtleandsubtlesttones for secondary text only.
Accessibility
Built in
- Tones meet WCAG AA contrast on every surface token.
You provide
elementType="p"for paragraphs so the text has the right semantics.
API reference
Text
| Prop | Type | Default | Description |
|---|---|---|---|
size | TextSize | "body" | |
tone | TextTone | "default" | |
weight | "medium" | "regular" | "regular" | |
elementType | "div" | "span" | "p" | "span" |
|
isNumeric | boolean | – | Lines up figures in columns and changing values. |
truncate | boolean | – | One line, cut with an ellipsis where its container ends (a table cell, a card title). |
childrenRequired | React.ReactNode | – |
sizeTextSizeDefault"body"toneTextToneDefault"default"weight"medium" | "regular"Default"regular"elementType"div" | "span" | "p"Default"span"pfor a paragraph (kept under ~70 characters a line),spaninline,divfor a block.isNumericbooleanLines up figures in columns and changing values.
truncatebooleanOne line, cut with an ellipsis where its container ends (a table cell, a card title).
childrenRequiredReact.ReactNode
Prose
| Prop | Type | Default | Description |
|---|---|---|---|
childrenRequired | React.ReactNode | – |
childrenRequiredReact.ReactNode