---
title: "offset(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/offset(_:)"
---

# offset(_:)

Offset this view by the horizontal and vertical amount specified in the offset parameter.

## Declaration

```swift
nonisolated func offset(_ offset: CGSize) -> some View

```

## Parameters

- `offset`: The distance to offset this view.

## Return Value

Return Value A view that offsets this view by offset.

## Discussion

Discussion Use offset(_:) to shift the displayed contents by the amount specified in the offset parameter. The original dimensions of the view aren’t changed by offsetting the contents; in the example below the gray border drawn by this view surrounds the original position of the text: Text("Offset by passing CGSize()")     .border(Color.green)     .offset(CGSize(width: 20, height: 25))     .border(Color.gray)

## See Also

### Adjusting a view’s position

- [Making fine adjustments to a view’s position](swiftui/making-fine-adjustments-to-a-view-s-position.md)
- [position(_:)](swiftui/view/position(_:).md)
- [position(x:y:)](swiftui/view/position(x:y:).md)
- [offset(x:y:)](swiftui/view/offset(x:y:).md)
- [offset(z:)](swiftui/view/offset(z:).md)
