---
title: "offset(x:y:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/hovereffectcontent/offset(x:y:)"
---

# offset(x:y:)

Offsets the view by the specified horizontal and vertical distances.

## Declaration

```swift
func offset(x: CGFloat = 0, y: CGFloat = 0) -> some HoverEffectContent

```

## Parameters

- `x`: The horizontal distance to offset the view.
- `y`: The vertical distance to offset the view.

## Return Value

Return Value An effect that offsets the view by x and y.
