---
title: "body(content:context:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/previewmodifier/body(content:context:)"
---

# body(content:context:)

Modify a preview by applying the shared context.

## Declaration

```swift
@ContentBuilder @MainActor func body(content: Self.Content, context: Self.Context) -> Self.Body
```

## Parameters

- `content`: A proxy for the preview being modified.
- `context`: The shared context to apply.
