@redrob-labs/ui v1.0.2 · Redrob Group Design System 2026

Button

Actions · src/components/Button/Button.tsx

Triggers an action: submitting a form, opening a dialog, running a search.

Labels are verbs - "Save role", not "OK". An icon on its own is IconButton, not a Button with no children: the two have different hit areas and different accessible names.

loading keeps the label in place rather than replacing it with a spinner, so the button does not change width while a request is in flight, and sets aria-busy for anything listening.

Import

import { Button } from '@redrob-labs/ui';

Rendered

The design system's own preview case, run against this package's build. The parity gate compares this rendering to the reference bundle's.

Props

PropTypeNotes
variant 'primary' | 'secondary' | 'ghost' | 'danger' Visual weight. One primary per view: it names the action the screen is about.
size 'sm' | 'md' | 'lg' sm 32px, md 40px, lg 48px. md everywhere except toolbars and table rows.
shape 'rounded' | 'pill' Fully rounded. One prominent action per view.
emphasis boolean Soft brand halo around the one action a view is about.
loading boolean Disables the button, swaps the leading icon for a spinner and keeps the label.
iconLeft React.ReactNode
iconRight React.ReactNode
fullWidth boolean

Also accepts everything on React.ButtonHTMLAttributes<HTMLButtonElement>.