Button
A button starts an action in place: it signs in, saves, sends, confirms, or moves a flow to its next step.
When to use
- To act: submit a form, save a change, sign in, copy, print, confirm a choice.
- To move a task forward: "Continue" to the next step of the same flow.
- As a call to action that opens another page ("Explore jobs", "Install the app"). It stays an
<a href>and looks like a button. - For the one main action of a view (filled) and the quieter actions beside it (outlined, text, tonal).
When not to use
| Need | Use instead |
|---|---|
| A link inside a sentence, a list of destinations, "See all 15 jobs" | Link |
| An action with no words (close, menu, save a job) | Icon button |
| A choice between two to four modes of the same content | Segmented button |
| Turning a filter on and off, a ready-made search, a removable value | Chip |
| A setting that applies at once | Switch, in Checkbox, radio, and switch |
| An answer to a form question | Choice card or radios |
| Signing in with Global ID from another product | The portable kit, Sign in with Global ID; never a restyled button |
| Showing which item is chosen | A button has no selected state: use a segmented button or an icon toggle |
Anatomy
- Container. A pill (
--radius-full) with a 1px border, transparent unless the variant is outlined, so forced-colors mode still draws the edge (D-SEM-10, D-CAI-20). - State layer. A
::beforeof the label color (currentColor) under the label, at 8% on hover and 12% while pressed. It covers the whole border box (inset: -1px), so no lighter rim shows inside the border (D-CAI-01, D-COL-05). - Hit-area extender. A
::after, sm only, that reaches 5px above and below so the target is 48px (D-ARC-05). - Leading icon or spinner (optional),
.oa-btn__iconor.oa-spinner: what the action does. - Label,
.oa-btn__label. - Trailing arrow (optional, never together with a leading icon): where the action goes.
- Count badge (optional): the badge, 8px after the label, its count part of the button's name.
Variants
Write one variant modifier on every button. A bare .oa-btn draws like the text button.
| Variant | Class | Use for | Container | Label and icon | Border |
|---|---|---|---|---|---|
| filled | oa-btn--filled |
The one main action of the view | --color-primary (bg-primary) |
--color-on-primary (text-on-primary) |
transparent |
| tonal | oa-btn--tonal |
An emphasized second action ("Review" and "Approve" in Global ID's admin lists); helpers inside forms | --color-secondary-container |
--color-on-secondary-container |
transparent |
| outlined | oa-btn--outlined |
The secondary action beside a filled one; Cancel in phone sheets | none | --color-primary-ink (text-primary-ink) |
--color-outline (border-outline) |
| text | oa-btn--text |
Low emphasis; Cancel in desktop dialogs; "Try again", "Choose another", "Clear filters" | none | --color-primary-ink |
transparent |
| danger | oa-btn--danger |
Only the confirm button of a destructive dialog; its trigger on the page is outlined or text | --color-error (bg-error) |
--color-on-error |
transparent |
| on-art | oa-btn--on-art |
Card art and photos, in family products only | --color-on-card-art with --shadow-elevation-1 |
--color-on-primary |
transparent |
- Orange is a fill. The filled button is the only orange container; orange words on outlined and text buttons are
primary-ink, which holds 4.5:1 on every surface and under the hover layer (D-COL-02, D-COL-03, D-CAI-02). - The tonal button is lavender (
secondary-container). It never competes with the orange fill (D-COL-06). - on-art exists because a filled orange button vanishes on orange card art. It is the one button that casts a shadow (canonical §10.1); every other button is flat. It is family-only: under Tamakkan's accent
on-primaryis white, so its label would be white on white (1:1). Endorsed brands put the filled button on art instead (5.70:1) (D-CAI-02, D-ARC-12). The art it sits on re-points--color-focus-ringto--color-on-card-art(canonical §2.8).
Sizes
| Size | Class | Height | Padding (inline) | Type style | Icon | Hit area | Typical place |
|---|---|---|---|---|---|---|---|
| sm | oa-btn--sm |
40px, --size-button-sm (h-10) |
20px, --space-5 (px-5) |
label-md (14/20 600) |
18px, --size-icon-sm |
48px through the ::after, 5px above and below |
Table rows, cards, dense toolbars, form helpers |
| md (default) | none | 48px, --size-button-md (h-12) |
24px, --space-6 (px-6) |
label-lg (16/24 600) |
20px, --size-icon-md |
48px | Toolbars, desktop dialogs, secondary actions |
| lg | oa-btn--lg |
56px, --size-button-lg (h-14) |
28px, --space-7 (px-7) |
label-lg |
20px, --size-icon-md |
56px | The main action of a key screen, phone sheets, the hero |
- The gap between icon and label is 8px (
--space-2) at every size, and the padding is the same with or without an icon (D-CAI-03, D-ARC-20, D-ARC-22). - A button keeps a fixed height and never wraps, so Arabic buttons stay as tall as English ones (D-CAI-03).
- Wide (
oa-btn--wide): the full width of its row, at least its size's height, 8px block padding, centered text that may wrap to a second line. Use it for the main button on phones and for long French labels. Keep the label to two lines (canonical §10.1). - Rows of sm buttons keep at least 8px between them so the extended hit areas never overlap (D-ARC-05).
Tokens
| Part | Property | Token (Tailwind) |
|---|---|---|
| Container | height | --size-button-sm, --size-button-md, --size-button-lg (h-10, h-12, h-14) |
| Container | padding inline | --space-5, --space-6, --space-7 (px-5, px-6, px-7) |
| Container | gap | --space-2 (gap-2) |
| Container | corner | --radius-full (rounded-full) |
| Container | fill | --color-primary, --color-secondary-container, --color-error, --color-on-card-art |
| Container | border | 1px transparent; outlined --color-outline |
| Container | shadow | none; on-art --shadow-elevation-1 (shadow-elevation-1) |
| Label | color | --color-on-primary, --color-on-secondary-container, --color-primary-ink, --color-on-error |
| Label | type | --text-label-lg (md, lg) and --text-label-md (sm), each with its line height, letter spacing, and weight (text-label-lg, text-label-md) |
| Icon | size | --size-icon-md (md, lg), --size-icon-sm (sm) |
| State layer | extent | the border box: inset: -1px over the 1px border (before:-inset-px) |
| State layer | opacity | --opacity-state-hover (0.08), --opacity-state-pressed (0.12) |
| State layer | fade | --duration-short-3 with --ease-standard (duration-short-3, ease-standard) |
| Disabled | fill | --color-on-surface at --opacity-state-disabled-container (12%) |
| Disabled | label and icon | --color-on-surface at --opacity-state-disabled-content (38%) |
| Disabled | outline | --color-on-surface at 12% (--opacity-state-disabled-container; canonical §10.1) |
| Focus | ring | --size-focus-ring (3px) solid --color-focus-ring, --size-focus-offset (2px) |
| Loading | spinner | .oa-spinner: a quarter arc in the label color with no track, at the icon's size (--size-icon-md, --size-icon-sm in sm), turning with --animate-spinner |
Values for both themes and the Tamakkan accent are in the token reference.
States
| State | What changes |
|---|---|
| Enabled | The variant's colors. |
| Hover | Pointer devices only (@media (hover: hover)): the state layer at --opacity-state-hover, fading in over --duration-short-3 with --ease-standard. Nothing moves, lifts, scales, or brightens, and arrows never nudge (D-SEM-15, C-1). |
| Focus-visible | The base ring: 3px --color-focus-ring, 2px outside the pill. There is no focus layer; the ring is the indicator (D-ARC-02, D-SEM-11). A button that sits inside an orange fill or on card art takes the ring color its container sets, never one of its own (canonical §2.8); the filled button itself keeps the default ring, which is drawn on the page outside its fill. |
| Pressed | The layer at --opacity-state-pressed, shown at once (0ms) and released over --duration-short-3. |
| Selected | None. Use a segmented button or an icon toggle. |
| Disabled | Native [disabled] (or [aria-disabled="true"] on a control that must stay focusable): fill on-surface 12%, label and icon 38%, outline 12% (canonical §10.1), no layer, no shadow. Use it rarely and never to signal missing or invalid input: let people press the button and show the error (D-CAI-06, D-ARC-33). |
| Loading | [aria-busy="true"] with [aria-disabled="true"]. Colors and focus stay. The label changes to its progress form ("Sending…"), the spinner takes the leading icon's place (or sits before the label), the width is locked at its resting value, and presses are ignored. Under reduced motion the spinner stands still and the words carry the state (D-CAI-06, canonical §10.0, §10.23). Inside a button the spinner is a quarter arc in the label color with no track, as D-CAI-06 draws it: on outlined and text buttons the arc is canonical's primary-ink; on a fill canonical's primary-ink arc would be 2.58:1 on orange (canonical §2.8), and its --color-outline-variant track would leave the arc only 1.4 to 1.9:1 from it on the danger fill, under the Tamakkan accent, and on the orange fill in dark. |
| Error | None. Errors show on the fields and in a banner above the main button. |
Behavior
One main action. Each view has one filled button in its content: an app screen, a dialog, a sheet, or one full-height section of a marketing page. It is lg (56px) on key screens (sign-in, registration, forms, phone sheets, the hero) and md in desktop dialogs and toolbars. On phones, below 640px (Tailwind sm:), it spans the width (oa-btn--wide, or w-full sm:w-auto in Tailwind) (D-CAI-04, D-BCP-24); the rule switches at --breakpoint-sm because the system uses Tailwind's breakpoints only (canonical §4.2).
Closed (D-CSN-53, 2026-11-21): no site header carries a call to action, so the client call D-CAI-04 no longer applies; every page has exactly one orange fill, in its content.
Below 640px the header keeps its CTA only when the label fits on one line at 360px in every language the product ships; otherwise the CTA moves into the menu sheet (Site header, canonical §10.14).
Pairs and footers (D-CAI-04):
| Place | Order and look | Class |
|---|---|---|
| A page | The filled button first, then an outlined or text button, 12px apart; below 640px (Tailwind sm:) a full-width column with the filled button on top |
oa-actions oa-actions--page |
| A dialog (from 768px) | Cancel first as a text button, the main button at the inline end, both md, 8px apart | oa-actions |
| A bottom sheet (below 768px) | Cancel outlined and the main button, both lg, sharing the width | oa-actions oa-actions--sheet |
One content in .oa-modal (a sheet below 768px, a dialog from 768px) |
Write the dialog form (text Cancel, both md); below 768px the row grows both buttons to 56px, shares the width, and draws Cancel's outline | oa-actions oa-actions--modal |
| A destructive confirmation | Cancel, then the danger button; the trigger on the page is outlined or text | as above |
A long label wraps the row rather than squeezing a button: the two buttons then stack, Cancel first.
Icons (D-CAI-05, D-BCP-34, C-1):
- One icon at most.
- A leading icon says what the action does (
download,content_copy,add_to_home_screen). - A trailing arrow says where it goes:
arrow_forwardto another page or step of the same product,north_eastwhen it leaves the product (another product, another site, a new tab), with a visually hidden "(opens in a new tab)" when it opens one. - Submits and commits never carry an arrow: "Sign in", "Save", "Send my request", "Apply now".
- Arrows take
oa-icon--mirrorand flip in Arabic; they never move on hover.
Keyboard. Enter and Space press a <button>; Enter follows an <a>. When an action removes its own button (a row is deleted), move focus to the next row or the list's heading.
Loading, the script contract. On press:
- Ignore the press if the button already has
[aria-disabled="true"]. - Lock the width:
button.style.minInlineSize = button.offsetWidth + 'px'. - Set
[aria-busy="true"]and[aria-disabled="true"]; keep focus on the button. - Swap the label for its progress form, and put
<span class="oa-spinner" aria-hidden="true"></span>in place of the leading icon (or before the label when there is none). - Announce the result through the page's polite status region (the snackbar host) or move focus to the error summary; then remove both attributes, restore the label, and clear the width.
Motion. Only the state-layer opacity and the colors change, over --duration-short-3 --ease-standard; a press shows at once. Under prefers-reduced-motion: reduce every change is instant (Motion).
Accessibility
- Element.
<button type="button">, ortype="submit"for its form's submit. A button that navigates stays<a href>; neverrole="button"on a link or a clickable<div>(D-CAI-01, canonical §10.0). - Name. The visible label. Icons are
<span … aria-hidden="true" translate="no">. When a short label repeats down a list, give each button a name that starts with the label and names the thing:aria-label="Approve the photo of …"(Global ID's photo queue) (canonical §12.5). - Keyboard and focus. Native
[disabled]leaves the tab order;[aria-disabled="true"]keeps the button focusable, which loading needs so focus never drops mid-press. - Target. 48px at least; sm reaches it with the
::after(5px each side, the 1px border counted) (D-LAY-12, D-ARC-05). - Contrast. Filled:
on-primaryonprimary6.19:1, 5.47:1 hovered, 5.08:1 pressed. Outlined and text:primary-ink5.45:1 or more on every surface at rest and 4.53:1 or more under the hover layer. Danger:on-erroronerror6.46:1 (light). The outline edge is 3:1 or more on every surface. Disabled content is exempt (WCAG 1.4.3) (canonical §2.13, D-COL-05). - Forced colors. The transparent border is drawn; disabled buttons turn
GrayText; the ring stays an outline. - Reduced motion. The spinner holds still beside its words.
- Results are announced by the page's status region, never by a toast without a role (canonical §13).
RTL and languages
- Padding and icon order follow the direction through logical properties. Trailing arrows (
arrow_forward,north_east) takeoa-icon--mirror;refresh,check,download, and other non-pointing icons never mirror (Iconography, canonical §8.3). - Arabic labels keep the same size and weight; the
:lang(ar)line height (1.75) fits the fixed heights. Labels are verbal nouns: "تسجيل الدخول", "متابعة", "حفظ", "إرسال الطلب" (D-BCP-22). - Product names inside a label stay Latin inside
<bdi translate="no">: "تثبيت Global Jobs". - French runs about 26% longer than English, and up to 32% longer in short labels such as buttons (canonical §3.7). Check every button at 360px; on phones the main button is wide; never truncate a label (D-TYP-15).
Content
- Verb first, one to four words, sentence case, no full stop, naming the result. The same action has the same label everywhere. Never "Submit", "OK", "Yes", "Click here" (D-BCP-21, canonical §12.3).
- Buttons that act on the person's own things speak as the person: "Show my ID", "Send my request" (canonical §12.1).
- A confirmation repeats the verb of its question: "Sign out of Global ID on this phone?" takes "Sign out" and "Cancel".
- Progress forms end with the single ellipsis character: "Sending…" / "جارٍ الإرسال…" / "Envoi…"; "Checking…", "Importing…".
| English | Arabic | French |
|---|---|---|
| Sign in | تسجيل الدخول | Se connecter |
| Sign out | تسجيل الخروج | Se déconnecter |
| Create account | إنشاء حساب | Créer un compte |
| Cancel | إلغاء | Annuler |
| Save | حفظ | Enregistrer |
| Continue | متابعة | Continuer |
| Try again | إعادة المحاولة † | Réessayer |
| Undo | تراجع | Défaire † |
| Done | تم | Terminé |
| Delete | حذف | Supprimer |
| Copy / Share / Download | نسخ / مشاركة / تنزيل | Copier / Partager / Télécharger |
† Needs native review before release (canonical §12.3).
Examples from the products: filled "Sign in", "Apply now", "Book a briefing", "Send my request", "Explore jobs"; tonal "Review", "Approve"; outlined "Install the app", "Save job", "Reject", "Download card"; text "Try again", "Choose another"; danger "Sign out", "Remove role"; on-art "Explore app".
Do and don't
| Do | Don't |
|---|---|
| One filled button per view; the rest outlined, text, or tonal. | Two filled buttons side by side. |
| "Send my request". | "Send my request →": submits carry no arrow. |
| Keep "Sign in" pressable and answer an empty form with "Enter your password." | Gray out "Sign in" until every field is filled. |
| Show "Sending…" with a spinner, colors kept, width locked. | Swap to the disabled gray while sending (2.27:1, and focus drops). |
oa-btn--wide for a long French label on a phone. |
Let a label run out of the button, or truncate it. |
north_east for a link that leaves the product, arrow_forward inside it. |
The same arrow for both, or an arrow that slides on hover. |
| The filled button on card art in Tamakkan. | The on-art button under an endorsed accent (white on white). |
Code
HTML (reference CSS)
Variants, from reference/snippets/actions.html:
<button type="submit" class="oa-btn oa-btn--filled"><span class="oa-btn__label">Sign in</span></button>
<button type="button" class="oa-btn oa-btn--tonal"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">visibility</span><span class="oa-btn__label">Review</span></button>
<a class="oa-btn oa-btn--outlined" href="#install"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">add_to_home_screen</span><span class="oa-btn__label">Install the app</span></a>
<button type="button" class="oa-btn oa-btn--text"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">refresh</span><span class="oa-btn__label">Try again</span></button>
<button type="button" class="oa-btn oa-btn--danger"><span class="oa-btn__label">Sign out</span></button>On art (family products only); the art re-points the ring:
<div style="display: flex; padding: var(--space-6); border-radius: var(--radius-card); background-color: var(--color-cat-orange-mid); --color-focus-ring: var(--color-on-card-art);">
<a class="oa-btn oa-btn--on-art" href="#explore-app" target="_blank" rel="noopener"><span class="oa-btn__label">Explore app<span class="oa-visually-hidden">: Global ID</span></span><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">north_east</span><span class="oa-visually-hidden">(opens in a new tab)</span></a>
</div>Sizes and icons:
<button type="button" class="oa-btn oa-btn--outlined oa-btn--sm"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">close</span><span class="oa-btn__label">Reject</span></button>
<button type="button" class="oa-btn oa-btn--outlined"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">download</span><span class="oa-btn__label">Download card</span></button>
<a class="oa-btn oa-btn--outlined oa-btn--lg" href="#install"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">add_to_home_screen</span><span class="oa-btn__label">Install the app</span></a>
<a class="oa-btn oa-btn--outlined" href="#continue"><span class="oa-btn__label">Continue</span><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_forward</span></a>
<a class="oa-btn oa-btn--outlined" href="#explore-global-id" target="_blank" rel="noopener"><span class="oa-btn__label">Explore Global ID</span><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">north_east</span><span class="oa-visually-hidden">(opens in a new tab)</span></a>Loading (the script set the width), disabled and wide:
<button type="submit" class="oa-btn oa-btn--filled oa-btn--lg" aria-busy="true" aria-disabled="true" style="min-inline-size: 180px"><span class="oa-spinner" aria-hidden="true"></span><span class="oa-btn__label">Sending…</span></button>
<button type="button" class="oa-btn oa-btn--text" disabled><span class="oa-btn__label">Clear filters</span></button>
<button type="button" class="oa-btn oa-btn--outlined oa-btn--lg oa-btn--wide"><span class="oa-btn__label">Télécharger une copie de mes données</span></button>Pairs and footers:
<div class="oa-actions oa-actions--page">
<a class="oa-btn oa-btn--filled oa-btn--lg" href="#sign-in"><span class="oa-btn__label">Sign in</span></a>
<a class="oa-btn oa-btn--outlined oa-btn--lg" href="#install"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">add_to_home_screen</span><span class="oa-btn__label">Install the app</span></a>
</div>
<div class="oa-actions">
<button type="button" class="oa-btn oa-btn--text"><span class="oa-btn__label">Cancel</span></button>
<button type="submit" class="oa-btn oa-btn--filled"><span class="oa-btn__label">Save</span></button>
</div>
<div class="oa-actions oa-actions--sheet">
<button type="button" class="oa-btn oa-btn--outlined oa-btn--lg"><span class="oa-btn__label">Cancel</span></button>
<button type="button" class="oa-btn oa-btn--danger oa-btn--lg"><span class="oa-btn__label">Sign out</span></button>
</div>
<div class="oa-actions oa-actions--modal">
<button type="button" class="oa-btn oa-btn--text"><span class="oa-btn__label">Cancel</span></button>
<button type="submit" class="oa-btn oa-btn--filled"><span class="oa-btn__label">Save</span></button>
</div>Arabic:
<div class="ks-row" dir="rtl" lang="ar">
<button type="submit" class="oa-btn oa-btn--filled oa-btn--lg"><span class="oa-btn__label">تسجيل الدخول</span></button>
<a class="oa-btn oa-btn--outlined" href="#continue"><span class="oa-btn__label">متابعة</span><span class="oa-icon oa-btn__icon oa-icon--mirror" aria-hidden="true" translate="no">arrow_forward</span></a>
<button type="submit" class="oa-btn oa-btn--tonal" aria-busy="true" aria-disabled="true"><span class="oa-spinner" aria-hidden="true"></span><span class="oa-btn__label">جارٍ الإرسال…</span></button>
<button type="button" class="oa-btn oa-btn--text"><span class="oa-icon oa-btn__icon" aria-hidden="true" translate="no">refresh</span><span class="oa-btn__label">إعادة المحاولة</span></button>
</div>Tailwind CSS v4
System utilities only; the state layer is the before:bg-current layer and its companions. Tailwind's hover variant already waits for @media (hover: hover).
<!-- Base: every button -->
<button class="relative isolate inline-flex shrink-0 items-center justify-center gap-2 rounded-full border border-transparent whitespace-nowrap select-none cursor-pointer no-underline transition-[background-color,border-color,color] duration-short-3 ease-standard before:pointer-events-none before:absolute before:-inset-px before:-z-1 before:rounded-[inherit] before:bg-current before:opacity-0 before:transition-opacity before:duration-short-3 before:ease-standard before:content-[''] hover:before:opacity-(--opacity-state-hover) active:before:opacity-(--opacity-state-pressed) active:before:duration-0 disabled:cursor-default disabled:before:opacity-0 aria-disabled:cursor-default aria-disabled:before:opacity-0"></button>
<!-- Sizes: sm (with the 48px extender), md, lg -->
<button class="h-10 px-5 text-label-md after:absolute after:inset-x-0 after:-inset-y-[5px] after:content-['']"></button>
<button class="h-12 px-6 text-label-lg"></button>
<button class="h-14 px-7 text-label-lg"></button>
<!-- Variants -->
<button class="bg-primary text-on-primary"></button> <!-- filled -->
<button class="bg-secondary-container text-on-secondary-container"></button> <!-- tonal -->
<button class="border-outline text-primary-ink"></button> <!-- outlined -->
<button class="text-primary-ink"></button> <!-- text -->
<button class="bg-error text-on-error"></button> <!-- danger -->
<button class="bg-on-card-art text-on-primary shadow-elevation-1"></button> <!-- on-art, family products only -->
<!-- Disabled, every variant: the label at 38% (loading, with aria-busy, is excluded) -->
<button class="disabled:text-on-surface/38 aria-disabled:not-aria-busy:text-on-surface/38"></button>
<!-- plus, on filled, tonal, danger, and on-art: the fill at 12% and no shadow -->
<button class="disabled:bg-on-surface/12 disabled:shadow-none aria-disabled:not-aria-busy:bg-on-surface/12 aria-disabled:not-aria-busy:shadow-none"></button>
<!-- plus, on outlined: the outline at 12%. The text button takes nothing more -->
<button class="disabled:border-on-surface/12 aria-disabled:not-aria-busy:border-on-surface/12"></button>
<!-- Wide (lg shown; min-h follows the size). For the main button on phones only, add sm:w-auto -->
<button class="w-full h-auto min-h-14 py-2 text-center whitespace-normal text-balance"></button>
<!-- Rows: dialog footer; bottom-sheet footer (each button flex-1 basis-0) -->
<div class="flex flex-wrap items-center justify-end gap-2"></div>
<button class="flex-1 basis-0"></button>
<!-- Responsive modal footer: buttons written for the dialog, grown below 768px; the text Cancel takes the outline -->
<button class="max-md:h-14 max-md:flex-1 max-md:basis-0 max-md:px-7"></button>
<button class="max-md:border-outline"></button>
<!-- Page pair: filled first; a full-width column below 640px -->
<div class="flex flex-wrap items-center justify-start gap-3 max-sm:flex-col max-sm:items-stretch"></div>
<button class="max-sm:w-full max-sm:h-auto max-sm:min-h-14 max-sm:py-2 max-sm:whitespace-normal"></button>Icons are the family Icon at text-(length:--size-icon-md) (20px; sm buttons text-(length:--size-icon-sm)), shrink-0. The Icon mirrors arrow_forward and north_east in RTL from its registry (oa-icon--mirror); never decide it per use with rtl:-scale-x-100 (canonical §8.3). The progress spinner takes the icon's place at the same size (size-5, size-4.5 in sm) with border-transparent border-t-current in place of border-outline-variant border-t-primary-ink. Where a class string cannot hold a pseudo-element (unedited shadcn/ui), the filled hover is hover:bg-[color-mix(in_srgb,var(--color-on-primary)_8%,var(--color-primary))] and the press active:bg-[color-mix(in_srgb,var(--color-on-primary)_12%,var(--color-primary))] (D-ARC-03).
shadcn/ui Button (canonical §2.12, §10.1):
| shadcn | System | Changes |
|---|---|---|
| default | filled | rounded-full, the size heights, and the state layer (or the mix above) |
| secondary | tonal | shadcn's secondary is secondary-container, the lavender fill |
| outline | outlined | border-outline text-primary-ink, transparent, no extra shadow |
| ghost | text, or a standard icon button | text-primary-ink; icon-only: size-12 text-on-surface-variant |
| link | a link | text-primary-ink underline underline-offset-4; an action that does not navigate is the text button |
| destructive | danger | bg-error text-on-error |
| sizes sm, default, lg, icon | 40, 48, 56, 48px |
React
The family Button (Global ID's Button, extended with trailingIcon, loading, and external):
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'filled' | 'tonal' | 'outlined' | 'text' | 'danger' | 'on-art' |
'filled' |
One filled button per view; on-art in family products only. |
| size | 'sm' | 'md' | 'lg' |
'md' |
40, 48, or 56px. |
| icon | Material Symbols name | none | Leading icon: what the action does. Not with trailingIcon. |
| trailingIcon | 'arrow_forward' | 'north_east' |
none | Where it goes; mirrored in RTL. Never on submits. |
| wide | boolean | false | Full width; the label may wrap to two lines. |
| loading | boolean | false | Sets [aria-busy="true"] and [aria-disabled="true"], shows the spinner, locks the width, ignores presses. Pass the progress label as children. |
| disabled | boolean | false | Native disabled; rare. |
| href | string | none | Renders <a href> instead of <button>. |
| external | boolean | false | With href: target="_blank" rel="noopener", north_east, and the hidden "(opens in a new tab)" in the page language. |
| type | 'button' | 'submit' |
'button' |
Never submits unless told to. |
<Button size="lg" wide={isPhone} type="submit" loading={sending}>
{sending ? t('contact.sending') : t('contact.send')}
</Button>
// Global ID's confirm modal: isWide is true from 768px (a dialog), false below it (a bottom sheet).
const isWide = useIsWide()
<ModalActions>
<Button variant={isWide ? 'text' : 'outlined'} size={isWide ? 'md' : 'lg'} className={isWide ? undefined : 'flex-1'} onClick={onClose}>{t('signOut.cancel')}</Button>
<Button variant="danger" size={isWide ? 'md' : 'lg'} className={isWide ? undefined : 'flex-1'} onClick={onConfirm}>{t('signOut.confirm')}</Button>
</ModalActions>