# How to keep text from overflowing (Text Autofit)

> Choose how text behaves when it doesn't fit its box — so dynamic content never breaks your design

- **URL**: https://orshot.com/help/text-sizing-modes

---

When text changes — especially [via API](https://orshot.com/help/make-your-template-dynamic) — a long value can outgrow its box. **Text Autofit** decides what happens then, per layer.

## Set it in two clicks

1. Select a **text layer** on the canvas
2. In **Styles**, find **Text Autofit** and pick a mode

![The Text Autofit control in the Styles panel](https://orshot.com/help/studio/text-sizing-1-autofit-control.webp)

## The four modes

![The four Text Autofit modes in the dropdown](https://orshot.com/help/studio/text-sizing-2-modes.webp)

| Mode | What happens | Best for |
| --- | --- | --- |
| **Overflow** | Text displays in full, extending beyond the box | Fixed text you control |
| **Truncate** | Text clips with an ellipsis (…) | Titles from feeds or user input |
| **Fit** | Text auto-shrinks to fit the box | Headlines that change via API |
| **Flow** | Text continues across pages automatically | Long documents and PDFs |

## Set a minimum size for Fit

With **Fit**, also set **Min. Font Size** — text shrinks no further than this, keeping it readable even with very long values.

![Min Font Size input below Text Autofit](https://orshot.com/help/studio/text-sizing-3-min-font-size.webp)

## Related