Buttons
A button is Adwaita’s most direct control: a widget you press to make something happen. This page collects the button family — a button’s icon-plus-label content, the style classes that give a button its shape and intent, the split button that couples an action with a menu, and the toggle group that turns a linked row of buttons into a single-choice selector.
Every widget below is described independently of any one toolkit, then shown
three ways. Native GJS (real Libadwaita through
@girs/adw-1) is the primary
implementation; the Web (@gjsify/adwaita-web)
and NativeScript (@gjsify/adwaita-nativescript)
ports mirror it. The preview is the real Web component — no screenshot — so it
follows the light/dark toggle just like a native window would.
Button Content
Section titled “Button Content”Adw.ButtonContent pairs a symbolic icon with a label as the child of a
button, so an action reads both at a glance and in words. It is the standard way
to give a button an icon and text, and can optionally ellipsize its label
(can-shrink) when horizontal space is tight.
Button Styles
Section titled “Button Styles”Adwaita ships a small set of style classes that restyle an ordinary button:
.pill for a rounded, prominent shape, .circular for an icon-only round
button, .suggested-action and .destructive-action to colour an affirmative
or dangerous action, and .flat to drop the visible background. They compose
with any button and carry the same meaning across the toolkit.
Split Button
Section titled “Split Button”Adw.SplitButton joins a primary action to a dropdown of related actions in
one linked control — click the main half to run the default action, or open the
attached menu for the alternatives. Adding the .flat style class gives the
variant that fits header bars and toolbars, where a raised button would read as
too heavy.
Toggle Group
Section titled “Toggle Group”Adw.ToggleGroup is a linked row of toggle buttons where exactly one is
active at a time — a compact, mutually-exclusive selector for a small set of
options, such as a view mode. Each toggle carries an icon and/or a label, and the
style classes .flat and .round adjust the group for toolbars or a
pill-shaped appearance.
Related
Section titled “Related”- Boxed Lists — rows that embed these buttons and reuse the same style classes.
- Layout — the containers that arrange buttons within a window.
- Adwaita Storybook — the same widgets in a live, interactive component browser.