Presentation
These widgets show state and identity rather than collect input. Use an avatar for a person or account, a banner for an in-context message, a shortcut label to draw a keyboard shortcut as keycaps, a spinner while work is running, a status page for an empty or error state, and a window title in a header bar.
Each block below is a stack of windows. The first one RUNS the widget: the preview
is the live browser port, so it follows the light and dark toggle the way a real
window would, and the HTML tab beside it holds the very markup that paints it —
one import '@gjsify/adwaita-web' registers every element in it. Then comes
one window per kind of implementation — Native TypeScript, the @girs program
that runs unchanged on GJS, Node, Bun and Deno, with the matching Blueprint
declaration beside it, UI frameworks, the same widget written in Solid, Vue and
React through @gjsify/gtk-host — or, where the widget is built imperatively rather
than declared, the recorded reason it has no such snippet — and NativeScript,
the port that runs on a phone. That last window splits the way the first one does. An
XML template holds the tree, and the TypeScript beside it is the loader.
Libadwaita is the reference here, typed by
@girs/adw-1.
@gjsify/adwaita-web
and @gjsify/adwaita-nativescript
follow its naming, and where one of them differs, its own window says so.
Avatar
Section titled “Avatar”Stand in for a person, account or entity. Ask for initials and give it a name, and it derives the initials and a stable background colour from that name; with either missing it falls back to a symbolic icon. Size scales it from an inline list glyph up to a full profile header.
Banner
Section titled “Banner”Surface one in-context status message across the top of a view: a metered connection, an offline state, a pending action. A banner takes a title and an optional action button, and it reveals and hides itself, so it only occupies space while the message applies.
Shortcut Label
Section titled “Shortcut Label”Draw a keyboard shortcut as keycaps instead of writing it out in prose. You
give it one accelerator string and it renders the keys in GTK’s fixed order,
whatever order you wrote the modifiers in. The string has four levels: a space
lists alternatives, ... is a range, + means the shortcuts are pressed
in sequence, and & means they are held together. An empty accelerator
shows the disabled-text placeholder instead.
Spinner
Section titled “Spinner”Show that work is running when you cannot say how much is left. The spinner turns continuously while visible and scales to any size, from an inline glyph to a page-filling placeholder. If you do know the progress, use a progress bar instead.
Status Page
Section titled “Status Page”Fill an empty, error or welcome screen with a centred placeholder: a large symbolic icon, a title and a description. Add a child widget to give the user a way out, such as a button that creates their first document.
Window Title
Section titled “Window Title”The title widget a header bar expects: a title with an optional subtitle, already sized and styled for that spot. Leave the subtitle empty and it collapses, so a single-line title stays vertically centred.
Related
Section titled “Related”- Boxed Lists: the row widgets for settings and detail screens.
- Feedback: toasts and dialogs, for messages that interrupt.
- Layout: the header bar a
WindowTitlegoes into. - Adwaita Storybook: the same widgets in a live component browser you can poke at.