---
title: TableRowContent
framework: swiftui
role: symbol
role_heading: Protocol
path: swiftui/tablerowcontent
---

# TableRowContent

A type used to represent table rows.

## Declaration

```swift
@MainActor @preconcurrency protocol TableRowContent<TableRowValue>
```

## Overview

Overview Like with the View protocol, you can create custom table row content by declaring a type that conforms to the TableRowContent protocol and implementing the required tableRowBody property. struct GroupOfPeopleRows: TableRowContent {     @Binding var people: [Person]

var tableRowBody: some TableRowContent<Person> {         ForEach(people) { person in             TableRow(person)                 .itemProvider { person.itemProvider }         }         .dropDestination(for: Person.self) { destination, newPeople in             people.insert(contentsOf: newPeople, at: destination)         }     } } This example uses an opaque result type and specifies that the primary associated type TableRowValue for the tableRowBody property is a Person. From this, SwiftUI can infer TableRowValue for the GroupOfPeopleRows structure is also Person. A type conforming to this protocol inherits @preconcurrency @MainActor isolation from the protocol if the conformance is included in the type’s base declaration: struct MyCustomType: Transition {     // `@preconcurrency @MainActor` isolation by default } Isolation to the main actor is the default, but it’s not required. Declare the conformance in an extension to opt out of main actor isolation: extension MyCustomType: Transition {     // `nonisolated` by default }

## Topics

### Getting the row body

- [tableRowBody](swiftui/tablerowcontent/tablerowbody-swift.property.md)
- [TableRowBody](swiftui/tablerowcontent/tablerowbody-swift.associatedtype.md)

### Defining the row value

- [TableRowValue](swiftui/tablerowcontent/tablerowvalue.md)

### Managing interaction

- [draggable(_:)](swiftui/tablerowcontent/draggable(_:).md)
- [dropDestination(for:action:)](swiftui/tablerowcontent/dropdestination(for:action:).md)
- [onHover(perform:)](swiftui/tablerowcontent/onhover(perform:).md)
- [itemProvider(_:)](swiftui/tablerowcontent/itemprovider(_:).md)
- [ItemProviderTableRowModifier](swiftui/itemprovidertablerowmodifier.md)

### Adding a context menu to a row

- [contextMenu(menuItems:)](swiftui/tablerowcontent/contextmenu(menuitems:).md)
- [contextMenu(menuItems:preview:)](swiftui/tablerowcontent/contextmenu(menuitems:preview:).md)

### Instance Methods

- [selectionDisabled(_:)](swiftui/tablerowcontent/selectiondisabled(_:).md)

## Relationships

### Inherited By

- [DynamicTableRowContent](swiftui/dynamictablerowcontent.md)

### Conforming Types

- [DisclosureTableRow](swiftui/disclosuretablerow.md)
- [EmptyTableRowContent](swiftui/emptytablerowcontent.md)
- [ForEach](swiftui/foreach.md)
- [Group](swiftui/group.md)
- [ModifiedContent](swiftui/modifiedcontent.md)
- [OutlineGroup](swiftui/outlinegroup.md)
- [Section](swiftui/section.md)
- [TableForEachContent](swiftui/tableforeachcontent.md)
- [TableHeaderRowContent](swiftui/tableheaderrowcontent.md)
- [TableOutlineGroupContent](swiftui/tableoutlinegroupcontent.md)
- [TableRow](swiftui/tablerow.md)
- [TupleTableRowContent](swiftui/tupletablerowcontent.md)

## See Also

### Creating rows

- [TableRow](swiftui/tablerow.md)
- [TableHeaderRowContent](swiftui/tableheaderrowcontent.md)
- [TupleTableRowContent](swiftui/tupletablerowcontent.md)
- [TableForEachContent](swiftui/tableforeachcontent.md)
- [EmptyTableRowContent](swiftui/emptytablerowcontent.md)
- [DynamicTableRowContent](swiftui/dynamictablerowcontent.md)
- [TableRowBuilder](swiftui/tablerowbuilder.md)
