# Guide: Dynamic text layouts

> Build layouts that reflow automatically as text gets longer or shorter.

Source: https://bluepic.io/help/expressions-and-logic/guide-dynamic-text-layouts  
Language: en  
Category: expressions-and-logic  
Last updated: 2026-06-16

Text in Bluepic resizes and wraps to fit its box, so when content comes from an [input field](https://bluepic.io/help/input-fields/text-input-fields) you rarely know its final size. Expressions let the rest of the layout move with it, so nothing overlaps and the spacing stays even.

The trick is to position elements relative to each other using [element measurements](https://bluepic.io/help/expressions-and-logic/element-metadata-subproperties) instead of fixed coordinates.

**Example: a caption that follows a headline.**

1. Place your headline and caption text elements.
2. Select the caption and open the [expression tool](https://bluepic.io/help/expressions-and-logic/expression-tool) on its **Y** position.
3. Set it to `headline.bottom + 20`.

Now the caption always sits 20 pixels below the headline. A long headline pushes the caption down, a short one pulls it up, and the gap stays the same.

![](https://imagedelivery.net/mudX-CmAqIANL8bxoNCToA/8aba5b9e-8ba3-46c7-0f1b-c0be7f85ef00/max)

You can chain this: give a third element a Y of `caption.bottom + 20` and the whole stack reflows together. The same idea works sideways with `left` and `right`, for example placing a badge at `title.right + 10`.
