2026-07-20 14:15:45 +02:00
# `<text>`
2026-07-08 22:33:29 +02:00
2026-07-20 14:15:45 +02:00
A text node; children become editable glyphs. Because the box defaults to the parent's box, a centered full-frame title is simply `<text textAlign="center" textBaseline="middle">…</text>` .
2026-07-08 22:33:29 +02:00
```tsx
2026-07-20 14:15:45 +02:00
< text fill = " #FFFFFF " fontSize = {128} fontWeight = "bold" textAlign = "center" textBaseline = "middle" >
2026-07-08 22:33:29 +02:00
Hello World
2026-07-20 14:15:45 +02:00
< / text >
2026-07-08 22:33:29 +02:00
```
## Props
All [common props ](./elements.md#common-props ), plus:
| Prop | Type | Default | Meaning |
| ---- | ---- | ------- | ------- |
| children | `string` (or expressions resolving to strings) | **required** | The text content. |
2026-07-24 17:20:02 +02:00
| `fontFamily` | `string` | editor default | A family available on the machine ([`dapi fonts` ](../fonts.md )); see [fonts.md ](./fonts.md ). |
2026-07-08 22:33:29 +02:00
| `fontSize` | `number` | editor default | Px. |
| `fontWeight` | `number \| "normal" \| "bold"` | `"normal"` | CSS weights `100` -`900` . |
| `fontStyle` | `"normal" \| "italic"` | `"normal"` | |
2026-07-12 10:54:06 +02:00
| `fill` | `string` | white | The glyph color; any CSS color, alpha ignored (use `opacity` ). Shorthand for a solid paint child (see [paints.md ](./paints.md )); animate it by declaring the paint explicitly. |
2026-07-08 22:33:29 +02:00
| `textAlign` | `"left" \| "center" \| "right"` | `"left"` | Horizontal alignment of glyphs within the box. |
| `textBaseline` | `"top" \| "middle" \| "bottom"` | `"top"` | Vertical alignment within the box. |
2026-07-15 15:33:44 +02:00
The text-only [animation types ](./animations.md ) (`"appearWord"` , `"appearChar"` , `"scramble"` ) animate the glyphs themselves.