Check out example codes for "SwiftUI padding". It will help you in understanding the concepts better.

Code Example 1

Text("Example")

	// overall padding
    .padding(20)

	// left padding
	.padding(.leading, 20)

	// right padding
	.padding(.trailing, 20)
    
    // top padding
    .padding(.top, 20)
    
    // bottom padding
    .padding(.bottom, 20)

Learn ReactJs, React Native from akashmittal.com