BPKFlowStackView
public struct BPKFlowStackView<Data, Content> : View where Data : Collection, Content : View, Data.Element : Hashable
BPKFlowStackView is a SwiftUI view that arranges its children in a grid with a flexible number
of columns and rows.
This view adjusts the number of columns based on the available width and the widths of the children. If a child does not fit in the current row, it is placed in the next row.
-
Creates an instance with the given spacing and content.
Declaration
Swift
public init( data: Data, spacing: BPKSpacing = .md, alignment: HorizontalAlignment = .leading, content: @escaping (Data.Element, Int) -> Content )Parameters
dataThe collection of data to be displayed
spacingA
BPKSpacingvalue indicating the space between children, with the same value for horizontal and vertical spacing.alignmentThe horizontal alignment of elements
contentThe view builder closure used to render each data element
-
Declaration
Swift
public var body: some View { get }