<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/listRowSeparator(_:edges:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE16listRowSeparator_5edgesQrAA10VisibilityO_AA12VerticalEdgeO3SetVtF"
  },
  "title" : "listRowSeparator(_:edges:)"
}
-->

# listRowSeparator(_:edges:)

Sets the display mode for the separator associated with this specific row.

```
nonisolated func listRowSeparator(_ visibility: Visibility, edges: VerticalEdge.Set = .all) -> some View
```

## Parameters

`visibility`

The visibility of this row’s separators.

`edges`

The set of row edges for which this preference applies.
The list style might already decide to not display separators for
some edges, typically the top edge. The default is
[`all`](/documentation/SwiftUI/VerticalEdge/Set/all).

## Discussion

Separators can be presented above and below a row. You can specify to
which edge this preference should apply.

This modifier expresses a preference to the containing [`List`](/documentation/SwiftUI/List). The list
style is the final arbiter of the separator visibility.

The following example shows a simple grouped list whose row separators
are hidden:

```
List {
    ForEach(garage.cars) { car in
        Text(car.model)
            .listRowSeparator(.hidden)
    }
}
.listStyle(.grouped)
```

To change the color of a row separators, use
[`listRowSeparatorTint(_:edges:)`](/documentation/SwiftUI/View/listRowSeparatorTint(_:edges:)).
To hide or change the tint color for a section separators, use
[`listSectionSeparator(_:edges:)`](/documentation/SwiftUI/View/listSectionSeparator(_:edges:)) and
[`listSectionSeparatorTint(_:edges:)`](/documentation/SwiftUI/View/listSectionSeparatorTint(_:edges:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)