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

# lineSpacing(_:)

Sets the amount of space between lines of text in this view.

```
nonisolated func lineSpacing(_ lineSpacing: CGFloat) -> some View
```

## Parameters

`lineSpacing`

The amount of space between the bottom of one
line and the top of the next line in points.

## Discussion

Use `lineSpacing(_:)` to set the amount of spacing from the bottom of
one line to the top of the next for text elements in the view.

In the [`Text`](/documentation/SwiftUI/Text) view in the example below, 10 points separate the bottom
of one line to the top of the next as the text field wraps inside this
view. Applying `lineSpacing(_:)` to a view hierarchy applies the line
spacing to all text elements contained in the view.

```
Text("This is a string in a TextField with 10 point spacing applied between the bottom of one line and the top of the next.")
    .frame(width: 200, height: 200, alignment: .leading)
    .lineSpacing(10)
```

![A screenshot showing the effects of setting line spacing on the text](images/com.apple.SwiftUI/SwiftUI-view-lineSpacing@2x.png)

---

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)