layout/DSFlowLayout

DSFlowLayout

layout
since v1.0

Wrapping layout that automatically flows children onto new lines when horizontal space is exhausted.

iOS 17+macOS 14+

Purpose

Tag clouds, skill chips, filter groups, and any variable-width content row.

Interactive Reference

Live showroom

Need the full visual surface?

Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().

Best for exploring:

variants, states, categories, and real app examples in one place.

Props

PropTypeDefaultDescription
spacingCGFloatDSSpacing.smGap between items.
lineSpacingCGFloatDSSpacing.smGap between rows.
contentreqViewBuilderโ€”Flow children.

Examples

Skills tag cloud

Auto-wrapping skill tags on a profile card.

swift
DSFlowLayout(spacing: DSSpacing.xs) {
    ForEach(skills) { skill in
        DSTag(skill.name, color: skill.color)
    }
}

Related Components