Memorisely

Components

Buttons

The action primitive. Five variants, four sizes, plus icon and loading. A button never invents its own colour.

Buy now

Variants

<Button>Publish now</Button>
<Button variant="outline">Stage for publish</Button>
<Button variant="secondary">Save draft</Button>
<Button variant="ghost">Cancel</Button>

How to use

One solid button is the primary action. Outline, secondary, and ghost sit beside it and stay quieter. Do not put two solid buttons in the same group.

Single button

Variant
Default
Size
md
State
Default
Label
Publish now
<Button>Publish now</Button>

How to use

Use a single solid button when the page has one action. The label is a verb. There is no second button to compete with it.

With icons

<Button>
  <Plus />
  New component
</Button>
<Button variant="outline">
  Continue
  <ArrowRight />
</Button>

How to use

Put the icon before the label when it names the action, and after the label when it points forward. The icon never replaces the words.

Danger

<Button variant="destructive">
  <Trash2 />
  Delete token
</Button>
<Button variant="ghost">Cancel</Button>

How to use

Destructive is only for an action that removes something or cannot be undone. Pair it with Cancel as ghost, and place Cancel second.

Sizes

<Button size="xs">Extra small</Button>
<Button size="sm">Small</Button>
<Button>Default</Button>
<Button size="lg">Large</Button>

How to use

Default is the size for forms and toolbars. Large is the page action. Small and extra small stay inside dense rows. Do not mix more than two sizes in one group.

Icon only

<Button size="icon" aria-label="New component">
  <Plus />
</Button>
<Button size="icon" variant="outline" aria-label="Search">
  <Search />
</Button>
<Button size="icon" variant="destructive" aria-label="Delete">
  <Trash2 />
</Button>

How to use

An icon button needs an accessible name. Use it for a repeated tool in a toolbar. Do not use it as the only action on a page.

Disabled

<Button disabled>Publish now</Button>
<Button variant="outline" disabled>Stage for publish</Button>

How to use

Disabled means the action exists but cannot run yet. Keep the button visible. Say why it is unavailable next to it.

Buttons exists so designers, engineers, and AI start from the same decision. The preview on this page is the component as it ships. You compose it. You do not redraw it.

Use it when the job matches the name. Reach for a neighbour in the system when it does not. Names in Figma match the names in code, which is what keeps a prototype close to what actually ships.

Tokens

TokenValue
--primaryvar(--foreground)
--primary-foregroundvar(--background)
--radius-md8px

Included

  • Five variants
  • four sizes