Interactive previews iPhone
Role Button With Default Label
Creates a button that displays a default label.
Platform Compatibility
iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+ visionOS 26.0+
Tags
SwiftUI Code
NavigationStack {
VStack {
Button(role: .cancel, action: action)
Button(role: .close, action: action)
Button(role: .confirm, action: action)
Button(role: .destructive, action: action)
Spacer()
}
.toolbar {
Button(role: .cancel, action: action)
Button(role: .close, action: action)
Button(role: .confirm, action: action)
Button(role: .destructive, action: action)
}
}Found an issue or have a suggestion?
Created: December 28, 2025Updated: December 29, 2025
More Button Components
View allGlass Button Styles
A button style that applies glass border artwork based on the button’s context
Explore Other Components
Browse allDefault Adaptable Tab Bar Placement
Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.
Fitted Sheet Sizing
Sets the sizing of the containing presentation. This does not have any effect on smaller devices like iPhone and Apple Watch. On macOS, fitted is the default.
Page Screen Sheet Size
On devices smaller than a page of paper, such as iPhone, Apple Watch, and 8" or 11" iPads, the sheet fills the entire height and, unlike the default sheet on iPad, the full width. On macOS, .page behaves like .fitted.
Custom Phases Async URL Image
Loads and displays a modifiable image from the specified URL load request in phases.