<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/LayoutProperties",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16LayoutPropertiesV"
  },
  "title" : "LayoutProperties"
}
-->

# LayoutProperties

Layout-specific properties of a layout container.

```
struct LayoutProperties
```

## Overview

This structure contains configuration information that’s
applicable to a layout container. For example, the [`stackOrientation`](/documentation/SwiftUI/LayoutProperties/stackOrientation)
value indicates the layout’s primary axis, if any.

You can use an instance of this type to characterize a custom layout
container, which is a type that conforms to the [`Layout`](/documentation/SwiftUI/Layout) protocol.
Implement the protocol’s [`layoutProperties`](/documentation/SwiftUI/Layout/layoutProperties) property
to return an instance. For example, you can indicate that your layout
has a vertical stack orientation:

```
extension BasicVStack {
    static var layoutProperties: LayoutProperties {
        var properties = LayoutProperties()
        properties.stackOrientation = .vertical
        return properties
    }
}
```

If you don’t implement the property in your custom layout, the protocol
provides a default implementation that returns a `LayoutProperties`
instance with default values.

## Topics

### Creating a layout properties instance

[`init()`](/documentation/SwiftUI/LayoutProperties/init())

Creates a default set of properties.

### Getting layout properties

[`var stackOrientation: Axis?`](/documentation/SwiftUI/LayoutProperties/stackOrientation)

The orientation of the containing stack-like container.

## Relationships

### Conforms To

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

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

---

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)