HStackLayout

A horizontal container that you can use in conditional layouts.

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

Declaration

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

Initializers

One SwiftUI initializer backs <HStackLayout>.

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

    The views this layout arranges.

  • The guide for aligning the subviews in this stack. It has the same vertical 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.