---
title: "List Row Spacing | Explore SwiftUI"
description: "Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples."
canonical_url: "https://exploreswiftui.com/library/list/list-row-spacing"
meta:
  author: "Explore SwiftUI"
  "og:description": "Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_List%2BRow%2BSpacing%2Cdescription_Sets%2Bthe%2Bvertical%2Bspacing%2Bbetween%2Btwo%2Badjacent%2Brows%2Bin%2Ba%2BList.%2Ccategory_List%2Cimage_~L2FwaS9pbWFnZXMvMTEyL3ZhcmlhbnRzLzMxP3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwidmlzaW9uT1MiXX0%2Cp_Ii9saWJyYXJ5L2xpc3QvbGlzdC1yb3ctc3BhY2luZyI%2Cs_xbN-s5kwQJosbkHj.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "List Row Spacing | Explore SwiftUI"
  "twitter:description": "Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_List%2BRow%2BSpacing%2Cdescription_Sets%2Bthe%2Bvertical%2Bspacing%2Bbetween%2Btwo%2Badjacent%2Brows%2Bin%2Ba%2BList.%2Ccategory_List%2Cimage_~L2FwaS9pbWFnZXMvMTEyL3ZhcmlhbnRzLzMxP3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwidmlzaW9uT1MiXX0%2Cp_Ii9saWJyYXJ5L2xpc3QvbGlzdC1yb3ctc3BhY2luZyI%2Cs_xbN-s5kwQJosbkHj.png"
  "twitter:title": "List Row Spacing | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=112)

# **List Row Spacing**

Sets the vertical spacing between two adjacent rows in a List.

![List Row Spacing - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/112/variants/31?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 15.0+ iPadOS 15.0+ visionOS 1.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/view/listrowspacing(_:)>)

```
List {
  Section {
    Text("Foo")
    Text("Bar")
  }
  Text("FooBar")
  Text("FooBar")
}
.listRowSpacing(5)
```

### **Found an issue or have a suggestion?**

Created: August 6, 2025Updated: August 6, 2025

![Connect Wizard](https://exploreswiftui.com/_ipx/f_webp&q_80&s_48x48/images/connect-wizard-icon.png)

**Connect Wizard**

**Unlock insights App Store Connect doesn’t show you.**

[** Get Started **](https://apps.apple.com/app/apple-store/id6747314580?pt=121213751&ct=Explore%20SwiftUI%20Banner&mt=8)

### **More List Components **

[**View all **](https://exploreswiftui.com/library/list)

![Outline Group - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/132/variants/371?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Outline Group**

A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.

![Disclosure Group - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/131/variants/363?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Disclosure Group**

A view that shows or hides another content view, based on the state of a disclosure control.

![Edit Button - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/130/variants/367?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Edit Button**

A button that toggles the edit mode environment value.

![Section Index Label and Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/129/variants/369?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Section Index Label and Visibility**

Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.

![Move Disabled - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/128/variants/361?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Move Disabled**

Adds a condition for whether the view’s view hierarchy is movable.

![Delete Disabled - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/127/variants/351?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Delete Disabled**

Adds a condition for whether the view’s view hierarchy is deletable.

![Refreshable List - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/126/variants/359?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Refreshable List**

Marks this view as refreshable.

![Swipe Action - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/125/variants/357?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Swipe Action**

Adds custom swipe actions to a row in a list.

### **Explore Other Components **

[**Browse all **](https://exploreswiftui.com/)

![GraphicalDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/62/variants/420?v=1790073478842&r=2&w=412&q=75&f=webp)

### **GraphicalDatePickerStyle**

A date picker style that displays an interactive calendar or clock

![Toolbar Title Alignment - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/258/variants/2111?v=1793542963212&r=2&w=412&q=75&f=webp)

### **Toolbar Title Alignment**

Sets the preferred alignment of the navigation bar’s title. The navigation bar resolves the alignment of its title automatically based on context, and toolbar roles. Use this modifier to override that resolution.

![Navigation Container Background - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/172/variants/529?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Navigation Container Background**

Sets the container background of the enclosing container using a view.

![VisionOS background materials - visionOS - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/260/variants/2143?v=1793707679045&r=2&w=412&q=75&f=webp)

### **VisionOS background materials**

All background materials on visionOS

![Glass effect - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/85/variants/33?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Glass effect**

Applies the Liquid Glass effect to a view

![Background Extension Effect - iPadOS - Landscape - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/91/variants/422?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Background Extension Effect**

Adds the background extension effect to the view. The view will be duplicated into mirrored copies which will be placed around the view on any edge with available safe area. Additionally, a blur effect will be applied on top to blur out the copies

![Toolbar Vertical Edge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/254/variants/1863?v=1790589836833&r=2&w=412&q=75&f=webp)

### **Toolbar Vertical Edge**

This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.

![Overlay Arrangement Edge - iOS on iPhone Duo - Landscape - Partially Open - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/251/variants/1787?v=1790586084694&r=2&w=412&q=75&f=webp)

### **Overlay Arrangement Edge**

The horizontal edge a view in an overlay arrangement occupies when the arrangement transitions to a horizontal layout. In this case, the primary view overlays the secondary view at the trailing edge when the screen is partially open in landscape.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#webpage","@type":"WebPage","dateModified":"2025-08-06T13:33:03.105Z","datePublished":"2025-08-06T13:33:03.105Z","description":"Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples.","name":"List Row Spacing","url":"https://exploreswiftui.com/library/list/list-row-spacing","breadcrumb":{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/list/list-row-spacing"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#article","dateModified":"2025-08-06T13:33:03.105Z","datePublished":"2025-08-06T13:33:03.105Z","description":"Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples.","headline":"List Row Spacing","inLanguage":"en-US","name":"List Row Spacing","thumbnailUrl":"https://exploreswiftui.com/api/images/112/variants/31?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/list/list-row-spacing","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@type":"WebSite","name":"Explore SwiftUI","url":"https://exploreswiftui.com"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#/schema/software-source-code/1","@type":"SoftwareSourceCode","codeRepository":"https://developer.apple.com/documentation/swiftui/view/listrowspacing(_:)","codeSampleType":"full example","description":"Sets the vertical spacing between two adjacent rows in a List. Learn how to use List Row Spacing in SwiftUI with visual code examples.","name":"List Row Spacing SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"List {\n  Section {\n    Text(\"Foo\")\n    Text(\"Bar\")\n  }\n  Text(\"FooBar\")\n  Text(\"FooBar\")\n}\n.listRowSpacing(5)","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"List"},{"@type":"Thing","name":"List Row Spacing"}]},{"@id":"https://exploreswiftui.com/library/list/list-row-spacing#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"List","item":"https://exploreswiftui.com/library/list","position":2},{"@type":"ListItem","name":"List Row Spacing","item":"https://exploreswiftui.com/library/list/list-row-spacing","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/112/variants/31?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/112/variants/31?v=1790073478842&r=2"}]}
```