<!--
{
  "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/SurfaceStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV12SurfaceStyleV"
  },
  "title" : "PortalComponent.SurfaceStyle"
}
-->

# PortalComponent.SurfaceStyle

The size of the flat plane mesh that RealityKit generates for a portal.

```
struct SurfaceStyle
```

## Overview

The factory entry points [`makePortal(surfaceStyle:boundaryStyle:boundaryMode:)`](/documentation/RealityKit/PortalComponent/makePortal(surfaceStyle:boundaryStyle:boundaryMode:))
and [`configure(world:portalEntity:surfaceStyle:boundaryStyle:boundaryMode:)`](/documentation/RealityKit/PortalComponent/configure(world:portalEntity:surfaceStyle:boundaryStyle:boundaryMode:))
use this value to build a [`ModelComponent`](/documentation/RealityKit/ModelComponent) whose mesh is a plane on the entity’s local
XY plane, centered at the entity’s origin.

The portal mesh size is independent of the clipping or crossing boundary, which you configure
with [`PortalComponent.BoundaryStyle`](/documentation/RealityKit/PortalComponent/BoundaryStyle).

## Topics

### Initializers

[`init(width: Float, height: Float)`](/documentation/RealityKit/PortalComponent/SurfaceStyle/init(width:height:))

Creates a surface style with the given width and height in meters.

### Instance Properties

[`var height: Float`](/documentation/RealityKit/PortalComponent/SurfaceStyle/height)

The height of the portal mesh, in meters, along the entity’s local Y axis.

[`var width: Float`](/documentation/RealityKit/PortalComponent/SurfaceStyle/width)

The width of the portal mesh, in meters, along the entity’s local X axis.

## Relationships

### Conforms To

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

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

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

[`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)