---
title: "init(_:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/anylayout/init(_:)"
---

# init(_:)

Creates a type-erased value that wraps the specified layout.

## Declaration

```swift
init<L>(_ layout: L) where L : Layout
```

## Discussion

Discussion You can switch between type-erased layouts without losing the state of the subviews.
