layout/DSFlowLayout
DSFlowLayout
layoutWrapping 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
| Prop | Type | Default | Description |
|---|---|---|---|
| spacing | CGFloat | DSSpacing.sm | Gap between items. |
| lineSpacing | CGFloat | DSSpacing.sm | Gap between rows. |
| contentreq | ViewBuilder | โ | 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)
}
}