SwiftUI.cc
SwiftUI API tag

ButtonRole SwiftUI examples

Reference pages that use ButtonRole, with practical code and implementation notes.

Showing 1-2 of 2 reference pages

Use alerts for urgent decisions and confirmationDialog for action choices that can adapt across iPhone, iPad, and macOS.

4 min readOpen

Button pairs an action with any label. Roles mark destructive and cancel semantics, built-in styles cover most designs, and buttonRepeatBehavior auto-repeats while held.

4 min readOpen