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

# init(_:value:comparator:)

Creates a sortable column that displays a string property and has a text label.

## Declaration

```swift
nonisolated init(_ text: Text, value: KeyPath<RowValue, String>, comparator: String.StandardComparator = .localizedStandard) where Content == Text
```

## Parameters

- `text`: The column’s label.
- `value`: The path to the property associated with the column, to display verbatim as text in each row of a table, and the key path used to create a sort comparator when sorting the column.
- `comparator`: The SortComparator used to order the string values.

## Discussion

Discussion This initializer creates a Text view for you, and treats the title similar to init(_:). For more information about localizing strings, see Text.

## See Also

### Creating a sortable column

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