Layout Components
Components for structuring content, including stacks, grids, containers, sections, and dividers. Create consistent, responsive layouts that adapt beautifully across all Apple platforms.
9 components available
DSStack
Convenience wrapper around HStack/VStack with design-token spacing pre-applied.
DSGrid
Responsive CSS-style grid wrapper with configurable columns and gap from the spacing token scale.
DSContainer
Max-width content wrapper with automatic horizontal padding.
DSSection
Named content group with an optional header, footer note, and inset background.
DSDivider
Horizontal or vertical rule using DSColor.border, with optional label.
DSFlowLayout
Wrapping layout that automatically flows children onto new lines when horizontal space is exhausted.
DSAccordion
Expandable/collapsible content section with a header and animated disclosure.
DSChipGroup
NewHorizontal container for chips with consistent spacing.
DSCardCarousel
NewHorizontal scrolling carousel of cards with spacing and peek effect.
Quick Import Reference
// Package.swift
.package(url: "https://github.com/luizmellodev/SwiftDS-package", from: "2.0.0")
// In any SwiftUI file
import SwiftDS
struct MyView: View {
var body: some View {
VStack(spacing: DSSpacing.md) {
// Use any layout component here
}
}
}