ControlSize
A control version that is the default size
Platform Compatibility
iOS 15.0+ iPadOS 15.0+ macOS 10.15+ watchOS 9.0+ tvOS 15.0+ visionOS 1.0+
Tags
SwiftUI Code
VStack {
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.mini)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.small)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.regular)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.large)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
// only on visionOS bigger than large
.controlSize(.extraLarge)
}
Found an issue or have a suggestion?
Created: June 12, 2025Updated: June 12, 2025