Components/Action

Button

Buttons are the controls a reader presses to make something happen. They advertise the actions a screen offers and carry them out on the spot, and their prominence is how a screen says which of those actions it recommends. A button’s label names the action, so the reader knows the outcome before committing to it.

import { Button } from '@growth-protocol-ai/alpha';

On this page

variant
emphasis
size
rounding
state
Button.tsxtsx
1import { Button } from '@growth-protocol-ai/alpha';
2
3<Button
4 variant="primary"
5 emphasis="solidFlat"
6 size="regular"
7 rounding="default"
8 disabled={false}
9 loading={false}
10>
11 Save changes
12</Button>

When to use

Reach for a button when the reader is doing something rather than going somewhere: submitting, saving, deleting, opening a dialog. Give each action group one primary button and let the rest of the group take a lower emphasis, so a reader can see at a glance which action the screen is recommending.

When not to use

Do not use a button to move the reader to another page — that is a link, and a link is what gives them a middle-click, a new tab and a preview of the destination. A control that holds a value rather than firing once is not a button either; reach for Toggle, Checkbox or Dropdown.

variant4 values

Variant is what the action is worth, and what picks it is the weight the action deserves next to everything else on the screen rather than the colour you want. Danger is the exception — it is picked by what the action does. When the button sits in a form or a data-dense view, outlined is the safe answer.

primary
secondary
outlined
danger
variantWhen to use
primaryThe main action — the one thing you most want the reader to do. One per action group.
secondaryA supporting action beside a primary one: Cancel, Skip, Back. Solid enough to notice, neutral enough not to compete.
outlinedThe safe default. It shares the neutral surface, border and height of an input, so it sits in a form without a visual mismatch.
dangerAn action that destroys something: delete, revoke, discard. It carries the same weight as a primary and reads as a warning, so a screen has at most one.

emphasis3 values

Emphasis is how much room the action gets to say it with, and it runs independently of variant. Ghost is effectively tertiary whatever it is applied to — a primary ghost is quieter than a secondary solid flat.

depth
solidFlat
ghost
emphasisWhen to use
depthElevated. The most prominent of the three at any variant — for an action that needs weight in a busy or hero context.
solidFlatSolid colour, no elevation. The everyday default, and the right answer most of the time.
ghostTransparent at rest, filling on interaction. For the quietest action in a group: toolbar utilities, row triggers, inline edits.

size2 values

Size is geometry only — it never changes what an action means. Both heights are shared with the dropdown trigger, so the two line up when placed side by side.

regular
large
sizeWhen to use
regular36px. Forms, inline actions and toolbars.
large52px. Page-level calls to action and hero placements.

rounding2 values

Two radii, and the choice is about register rather than emphasis. Keep it consistent within a screen: one pill among square buttons reads as a mistake.

default
full
roundingWhen to use
default12px. Forms, dialogs and internal UI — the everyday default.
fullA pill. Marketing-style and hero calls to action.