---
title: "init(selection:content:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/list/init(selection:content:)"
---

# init(selection:content:)

Creates a list with the given content that supports selecting a single row that cannot be deselected.

## Declaration

```swift
nonisolated init(selection: Binding<SelectionValue>, @ContentBuilder content: () -> Content)
```

## Parameters

- `selection`: A binding to a selected row.
- `content`: The content of the list.

## See Also

### Creating a list from a set of views

- [init(content:)](swiftui/list/init(content:).md)
