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

# init(_:columns:)

Creates a table that computes its rows based on a collection of identifiable data.

## Declaration

```swift
nonisolated init<Data>(_ data: Data, @TableColumnBuilder<Value, Never> columns: () -> Columns) where Rows == TableForEachContent<Data>, Data : RandomAccessCollection, Columns.TableRowValue == Data.Element
```

## Parameters

- `data`: The identifiable data for computing the table rows.
- `columns`: The columns to display in the table.

## See Also

### Creating a table from columns

- [init(_:selection:columns:)](swiftui/table/init(_:selection:columns:).md)
