Button Sizing
The preferred sizing behavior of buttons in the view hierarchy.
Platform Compatibility
iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+
Tags
SwiftUI Code
HStack {
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.buttonSizing(.fitted)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.buttonSizing(.flexible)
}Found an issue or have a suggestion?
Created: April 18, 2026Updated: April 18, 2026