<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/BoundaryStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV13BoundaryStyleV"
  },
  "title" : "PortalComponent.BoundaryStyle"
}
-->

# PortalComponent.BoundaryStyle

The shape of a portal’s clipping and crossing boundary.

```
struct BoundaryStyle
```

## Overview

A portal has two related but separate concepts:

- The *surface*, a flat plane mesh that RealityKit renders with [`PortalMaterial`](/documentation/RealityKit/PortalMaterial) and
  sizes from [`PortalComponent.SurfaceStyle`](/documentation/RealityKit/PortalComponent/SurfaceStyle).
- The *boundary*, the volume in space that clips portal world content and that
  crossing entities pass through. [`PortalComponent.BoundaryStyle`](/documentation/RealityKit/PortalComponent/BoundaryStyle) describes the shape of that volume.

Pair a boundary style with a [`PortalComponent.BoundaryMode`](/documentation/RealityKit/PortalComponent/BoundaryMode) to control whether the boundary clips
content, allows entities to cross, both, or neither.

## Topics

### Type Methods

[`static func enclosingBox(depth: Float) -> PortalComponent.BoundaryStyle`](/documentation/RealityKit/PortalComponent/BoundaryStyle/enclosingBox(depth:))

Returns a boundary style that uses a box enclosing the portal surface.

[`static func infinitePlane() -> PortalComponent.BoundaryStyle`](/documentation/RealityKit/PortalComponent/BoundaryStyle/infinitePlane())

Returns a boundary style that uses an infinite plane.

## Relationships

### Conforms To

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

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

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

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

---

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)