---
title: Layout modifiers
framework: swiftui
role: collectionGroup
role_heading: API Collection
path: swiftui/view-layout
---

# Layout modifiers

Tell a view how to arrange itself within a view hierarchy by adjusting its size, position, alignment, padding, and so on.

## Overview

Overview Use layout modifiers to fine tune the placement of views in a view hierarchy. You can adjust or constrain the size, position, and alignment of a view. You can also add padding around a view, and indicate how the view interacts with system-defined safe areas. To get started arranging views, see Layout fundamentals. To make adjustments to a basic layout, see Layout adjustments.

## Topics

### Size

- [frame(width:height:alignment:)](swiftui/view/frame(width:height:alignment:).md)
- [frame(depth:alignment:)](swiftui/view/frame(depth:alignment:).md)
- [frame(minWidth:idealWidth:maxWidth:minHeight:idealHeight:maxHeight:alignment:)](swiftui/view/frame(minwidth:idealwidth:maxwidth:minheight:idealheight:maxheight:alignment:).md)
- [frame(minDepth:idealDepth:maxDepth:alignment:)](swiftui/view/frame(mindepth:idealdepth:maxdepth:alignment:).md)
- [containerRelativeFrame(_:alignment:)](swiftui/view/containerrelativeframe(_:alignment:).md)
- [containerRelativeFrame(_:alignment:_:)](swiftui/view/containerrelativeframe(_:alignment:_:).md)
- [containerRelativeFrame(_:count:span:spacing:alignment:)](swiftui/view/containerrelativeframe(_:count:span:spacing:alignment:).md)
- [fixedSize()](swiftui/view/fixedsize().md)
- [fixedSize(horizontal:vertical:)](swiftui/view/fixedsize(horizontal:vertical:).md)
- [layoutPriority(_:)](swiftui/view/layoutpriority(_:).md)
- [containerCornerOffset(_:sizeToFit:)](swiftui/view/containercorneroffset(_:sizetofit:).md)

### Position

- [position(_:)](swiftui/view/position(_:).md)
- [position(x:y:)](swiftui/view/position(x:y:).md)
- [offset(_:)](swiftui/view/offset(_:).md)
- [offset(x:y:)](swiftui/view/offset(x:y:).md)
- [offset(z:)](swiftui/view/offset(z:).md)
- [coordinateSpace(_:)](swiftui/view/coordinatespace(_:).md)

### Alignment

- [alignmentGuide(_:computeValue:)](swiftui/view/alignmentguide(_:computevalue:).md)

### Padding and spacing

- [padding(_:)](swiftui/view/padding(_:).md)
- [padding(_:_:)](swiftui/view/padding(_:_:).md)
- [padding3D(_:)](swiftui/view/padding3d(_:).md)
- [padding3D(_:_:)](swiftui/view/padding3d(_:_:).md)
- [listRowInsets(_:)](swiftui/view/listrowinsets(_:).md)
- [listRowInsets(_:_:)](swiftui/view/listrowinsets(_:_:).md)
- [scenePadding(_:)](swiftui/view/scenepadding(_:).md)
- [scenePadding(_:edges:)](swiftui/view/scenepadding(_:edges:).md)
- [listRowSpacing(_:)](swiftui/view/listrowspacing(_:).md)
- [listSectionSpacing(_:)](swiftui/view/listsectionspacing(_:).md)
- [listSectionMargins(_:_:)](swiftui/view/listsectionmargins(_:_:).md)

### Grid configuration

- [gridCellColumns(_:)](swiftui/view/gridcellcolumns(_:).md)
- [gridCellAnchor(_:)](swiftui/view/gridcellanchor(_:).md)
- [gridCellUnsizedAxes(_:)](swiftui/view/gridcellunsizedaxes(_:).md)
- [gridColumnAlignment(_:)](swiftui/view/gridcolumnalignment(_:).md)

### Safe area and margins

- [ignoresSafeArea(_:edges:)](swiftui/view/ignoressafearea(_:edges:).md)
- [ignoresSafeArea(_:edges:alignment:)](swiftui/view/ignoressafearea(_:edges:alignment:).md)
- [safeAreaInset(edge:alignment:spacing:content:)](swiftui/view/safeareainset(edge:alignment:spacing:content:).md)
- [safeAreaBar(edge:alignment:spacing:content:)](swiftui/view/safeareabar(edge:alignment:spacing:content:).md)
- [safeAreaPadding(_:)](swiftui/view/safeareapadding(_:).md)
- [safeAreaPadding(_:_:)](swiftui/view/safeareapadding(_:_:).md)
- [contentMargins(_:for:)](swiftui/view/contentmargins(_:for:).md)
- [contentMargins(_:_:for:)](swiftui/view/contentmargins(_:_:for:).md)

### Layer order

- [zIndex(_:)](swiftui/view/zindex(_:).md)

### Layout direction

- [layoutDirectionBehavior(_:)](swiftui/view/layoutdirectionbehavior(_:).md)

### Custom layout characteristics

- [layoutValue(key:value:)](swiftui/view/layoutvalue(key:value:).md)
- [containerValue(_:_:)](swiftui/view/containervalue(_:_:).md)

## See Also

### Drawing views

- [Style modifiers](swiftui/view-style-modifiers.md)
- [Graphics and rendering modifiers](swiftui/view-graphics-and-rendering.md)
