<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/RealityViewLayoutOption",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI0A16ViewLayoutOptionV"
  },
  "title" : "RealityViewLayoutOption"
}
-->

# RealityViewLayoutOption

Options that specify the frame sizing and content alignment option for `RealityView`.

```
struct RealityViewLayoutOption
```

## Overview

Pass in a `RealityViewLayoutOption` when using the <doc://com.apple.documentation/documentation/SwiftUI/View/realityViewLayoutBehavior(_:)> modifier:

```swift
struct ModelWrapperView: View {
    let modelName: String
    var body: some View {
        RealityView { content in
            let model = try? await Entity(named: modelName)
            if let model {
                content.add(model)
            }
        }
        .realityViewLayoutBehavior(.fixedSize)
    }
}
```

## Topics

### Type Properties

[`static let centered: RealityViewLayoutOption`](/documentation/RealityKit/RealityViewLayoutOption/centered)

The option that centers the visual content within a flexible frame.

[`static let fixedSize: RealityViewLayoutOption`](/documentation/RealityKit/RealityViewLayoutOption/fixedSize)

The option that fixes the size of the frame to equal the size of the visual content and centers the
content within the new frame size.

[`static let flexible: RealityViewLayoutOption`](/documentation/RealityKit/RealityViewLayoutOption/flexible)

The option that applies the default layout behavior of `RealityView`, where the content is not
centered and the frame is flexible (takes up as much space as the SwiftUI layout provides).

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)