VStackLayout

A vertical container that you can use in conditional layouts.

ComponentiOS 16.0+macOS 13.0+tvOS 16.0+watchOS 9.0+VStackLayout in SwiftUI

Declaration

React
import { VStackLayout } from 'swiftui-react-native';
Swift
@frozen struct VStackLayout

Initializers

One SwiftUI initializer backs <VStackLayout>.

React
<VStackLayout
  alignment?: SwiftUI.HorizontalAlignment
  spacing?: number | null
>
  children?: ReactNode
</VStackLayout>
Swift
init(alignment: HorizontalAlignment = .center, spacing: CGFloat? = nil)
  • childrenReactNode

    The views this layout arranges.

  • The guide for aligning the subviews in this stack. It has the same horizontal screen coordinate for all subviews.

    Default `.center`

  • spacingnumber | null

    The distance between adjacent subviews. Set this value to nil to use default distances between subviews.

    Default `nil`

Also takes the common view props: modifiers, style and testID.

See also

More in Layout.