---
title: "init(width:height:)"
framework: realitykit
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "realitykit/portalcomponent/surfacestyle/init(width:height:)"
---

# init(width:height:)

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

## Declaration

```swift
init(width: Float, height: Float)
```

## Parameters

- `width`: The width of the portal mesh, in meters.
- `height`: The height of the portal mesh, in meters.
