+++
title = "Button"
description = "Let the user trigger an event."
date = 2024-11-15
[taxonomies]
tags = ["Aparoksha", "Windows", "Linux", "macOS"]
+++
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
{{ image(url="labelGNOME.png", alt="A button with a label on GNOME") }}
{{ image(url="labelWindows.png", alt="A button with a label on Windows") }}
```swift
Button("Default") {
print("Default")
}
```
## Icon
{{ image(url="iconGNOME.png", alt="A button with an icon on GNOME") }}
{{ image(url="iconWindows.png", alt="A button with an icon on Windows") }}
```swift
Button(icon: .airplane) {
print("Action")
}
```
## Label and Icon
{{ image(url="labelIconGNOME.png", alt="A button with a label and an icon on GNOME") }}
{{ image(url="labelIconWindows.png", alt="A button with a label and an icon on Windows") }}
```swift
Button("Icon", icon: .airplane) {
print("Icon")
}
```
## Guidelines
- GNOME
- Windows
## Documentation
- Reference Documentation
- Native GNOME Implementation
- Native Windows Implementation