In a nutshell
Margin controls the outer spacing between an element's boundary and its surrounding elements or parent container. You can apply a single value to all four sides at once, or set each side, top, right, bottom, and left, independently to control how the element sits within its layout.
Margin defines the visual space outside an element*link to elements page*, between its outer edge and the elements around it or the boundary of its parent container. It directly controls how separated an element feels from its neighbors. A larger margin creates greater distance and visual breathing room between elements, while less margin brings them closer together.
Margin accepts numeric values in px (pixels) or % (percentage):
The minimum value is 0 (no outer spacing). There is no enforced upper limit, though very large values may push the element outside its parent's visible area.
| Mode | How it works | Description |
| Uniform | One value applied equally to all four sides. | Provides consistent outer spacing on all sides Ideal for: Icons, cards, smaller text blocks, etc. |
| Per-side | Individual values for top, right, bottom, and left. | Supports asymmetric outer spacing, for example, more separation above and below an element than on its sides. Ideal for: Hero sections, frames, complex text blocks with multiple elements, etc. |
The examples below show how margin values affect the spacing around a Image element. The same visual behavior applies to all elements that support margin.
) and enter individual values in pixels or percentage for each side, T (top), R (right), B (bottom), and L.Margin is available on the primitives and composite elements listed below. Apart from this, it is also listed as a style property in all presets.