---
title: "safeAreaPadding(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/safeareapadding(_:)"
---

# safeAreaPadding(_:)

Adds the provided insets into the safe area of this view.

## Declaration

```swift
nonisolated func safeAreaPadding(_ insets: EdgeInsets) -> some View

```

## Discussion

Discussion Use this modifier when you would like to add a fixed amount of space to the safe area a view sees. ScrollView(.horizontal) {     HStack(spacing: 10.0) {         ForEach(items) { item in             ItemView(item)         }     } } .safeAreaPadding(.horizontal, 20.0) See the horizontal safeAreaInset(edge:alignment:spacing:content:) or vertical safeAreaInset(edge:alignment:spacing:content:) modifier for adding to the safe area based on the size of a view.

## See Also

### Staying in the safe areas

- [ignoresSafeArea(_:edges:)](swiftui/view/ignoressafearea(_:edges:).md)
- [ignoresSafeArea(_:edges:alignment:)](swiftui/view/ignoressafearea(_:edges:alignment:).md)
- [safeAreaInset(edge:alignment:spacing:content:)](swiftui/view/safeareainset(edge:alignment:spacing:content:).md)
- [safeAreaPadding(_:_:)](swiftui/view/safeareapadding(_:_:).md)
- [SafeAreaRegions](swiftui/safearearegions.md)
