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 allFitted 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.
Stepped Min Max Label Slider
Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels
SliderTickContentForEach
A type of slider content that creates content by iterating over a collection.
Section Index Label and Visibility
Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.
EllipticalListStyle
The list style that describes the behavior and appearance of an elliptical list.