---
title: "init(width:height:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/proposedviewsize/init(width:height:)"
---

# init(width:height:)

Creates a new proposed size using the specified width and height.

## Declaration

```swift
init(width: CGFloat?, height: CGFloat?)
```

## Parameters

- `width`: A proposed width in points. Use a value of nil to indicate that the width is unspecified for this proposal.
- `height`: A proposed height in points. Use a value of nil to indicate that the height is unspecified for this proposal.

## See Also

### Creating a custom size proposal

- [init(_:)](swiftui/proposedviewsize/init(_:).md)
