GtkButton
A widget that emits a signal when clicked.
Preview
CSS Node Tree
button[.flat][.text-button][.image-button][.image-text-button]
└── <child> (label, image, or custom content)Props
Style Classes
| Class | Effect |
|---|---|
.suggested-action | Blue accent background |
.destructive-action | Red accent background |
.flat | No background (same as hasFrame={false}) |
.pill | Fully rounded corners |
.circular | Circular shape |
.osd | On-screen display style |
Keyboard
- Space / Enter — Activates the button: it shows
.keyboard-activatinguntil the key is released (250 ms at most), then is clicked - Alt + mnemonic — With
useUnderline,_marks the next character of the label ("_Save"). Holding Alt underlines it, and Alt with that key activates the button