Button

The button is one of the most common user interface elements. Usually, buttons contain either an icon or a label. It is not recommended to use both in most cases.

For buttons containing a label, use imperative verbs using header capitalization, such as Save or Update. Labels should be kept short.

Label

A button with a label on GNOMEA button with a label on Windows
Button("Default") {
    print("Default")
}

Icon

A button with an icon on GNOMEA button with an icon on Windows
Button(icon: .airplane) {
    print("Action")
}

Label and Icon

A button with a label and an icon on GNOMEA button with a label and an icon on Windows
Button("Icon", icon: .airplane) {
    print("Icon")
}

Guidelines

Documentation