---
title: "init(_:value:comparator:content:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/tablecolumn/init(_:value:comparator:content:)"
---

# init(_:value:comparator:content:)

Creates a sortable column with a text label.

## Declaration

```swift
nonisolated init(_ text: Text, value: KeyPath<RowValue, String>, comparator: String.StandardComparator = .localizedStandard, @ContentBuilder content: @escaping (RowValue) -> Content)
```

## Parameters

- `text`: The column’s label.
- `value`: The path to the property associated with the column, used to update the table’s sorting state.
- `comparator`: The specific comparator to compare string values.
- `content`: The view content to display for each row in a table.

## Discussion

Discussion This initializer creates a Text view on your behalf, and treats the localized key similar to init(_:tableName:bundle:comment:). See Text for more information about localizing strings.

## See Also

### Creating a sortable column

- [init(_:value:content:)](swiftui/tablecolumn/init(_:value:content:).md)
- [init(_:value:comparator:)](swiftui/tablecolumn/init(_:value:comparator:).md)
- [init(_:sortUsing:content:)](swiftui/tablecolumn/init(_:sortusing:content:).md)
