SkillAgentSearch skills...

FlexibleStack

This provides flexible stack layout in SwiftUI.

Install / Use

/learn @Kyome22/FlexibleStack
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

FlexibleStack

This provides flexible stack layout in SwiftUI.

Optimizes the arrangement of items according to the aspect ratio of the parent view. <img src="./gif/aspect_ratio.gif" height="300px" />

Optimize the arrangement of items according to the number of them. <img src="./gif/item_count.gif" height="300px" />

Requirements

  • Development with Xcode 16.2+
  • Written in Swift 6.0
  • Compatible with iOS 16.4+

Usage

struct ContentView: View {
    let colors: [Color] = [.blue, .red, .green, .orange]

    var body: some View {
        FlexibleVStack {
            ForEach(colors.indices, id: \.self) { index in
                Rectangle()
                    .foregroundStyle(colors[index])
                    .frame(maxWidth: .infinity, maxHeight: .infinity)
            }
        }
        .padding()
    }
}
View on GitHub
GitHub Stars19
CategoryDevelopment
Updated2mo ago
Forks0

Languages

Swift

Security Score

90/100

Audited on Jan 19, 2026

No findings