Skip to content

Buttons

Buttons initiate actions and communicate their purpose through labels.

Usage

Use buttons to trigger actions. Labels should clearly describe the purpose and effect of the action, such as Add, Save, or Delete.

There are three semantic types:

  • Default buttons for standard actions such as Save or Submit.
  • Warning buttons for cautious decisions such as Overwrite or Restart.
  • Danger buttons for destructive actions such as Delete or Remove.

Each button also carries a visual weight:

  • Primary buttons highlight the main action of the page or task.
  • Secondary buttons for supporting actions.
  • Tertiary buttons for low-priority or less prominent actions.

Button

A button link is a button styled as a link.

Despite its link-like appearance, its primary distinction lies in its function: Links, built with the <a> HTML element, are designed for navigation, whereas button links, created using the <button> HTML element, are intended to trigger actions. This distinction ensures correct semantics, accessibility, and behavior.

While visually similar to a tertiary button, button links work well in tight layouts or inline with text, where a regular button would be too bulky.

Button link comparisson

Best practices

  • Use only one primary button per page.
  • Ensure call-to-action labels are straightforward and concise.
  • Use single-line text for button labels; avoid multi-line text.
  • When truncating text, ensure at least three characters of the content remain visible.
  • Use the loading button to indicate ongoing processes.
  • Use spacing-6 to define the space between buttons and other components/containers.

Except where otherwise noted, content on this site is licensed under MIT License.