Content blocks
Text
The paragraph block: 16/24 rich text with inline marks, colors, links and mentions. Child blocks indent under it.
Plain text with bold, italic, underline, strikethrough and .
Usage
- Use the Text block for body paragraphs; it is the default block of every page.
- Use inline marks (bold, italic, code, links, mentions) for emphasis inside a paragraph rather than separate blocks.
- Nest child blocks under a paragraph only for content that belongs to it; use Toggle when it should be collapsible.
- Don’t use Text with bold marks as a section title; use Heading instead.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/TextExample.tsx
Examples
Links and mentions
Text colors
Inline marks.color colors a run; a _background value highlights it.
gray purple
gray brown orange yellow green blue purple pink red
Block color
Blue background block
Nested children
Parent paragraph
Child paragraph, indented 24px
API Reference
TextBlock
Based on <div> and supports its props (except children, which is the nested blocks). Adds:
| Prop | Type | Default |
|---|---|---|
text | RichText | |
renderLeaf | LeafRenderer | |
color | BlockColor | "default" |
children | ReactNode | |
placeholder | string | " " |
Accessibility
- Links render as real
<a href>elements withrel="noopener noreferrer". - Mentions are non-editable spans; their label is plain text, so screen readers read “@Alex”.
- Colored text uses
<c>-text-secondarytokens; check contrast for long passages of colored text on colored backgrounds.
© 2026 Motion. Internal documentation.