Button

Three ways to initialize a button

Button - iOS Light Mode Preview

Platform Compatibility

iOS 13.0+ iPadOS 13.0+ macOS 10.15+ watchOS 6.0+ tvOS 13.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
HStack {
  Button("Tap Me", action: action)
  Button("Tap Me", systemImage: "hand.tap", action: action)
    .padding(.horizontal)
  Button(action: action) {
    Text("Tap Me")
    Image(systemName: "hand.tap")
  }
}

Found an issue or have a suggestion?

Created: May 30, 2025Updated: May 30, 2025