Live in kanso-ui

Button from kanso-ui as it draws today, in Kanso’s tokens. Press, hover and tab through it: the shapes, the springs and the sizes are the library’s own.

Filled, the strong action · tonal · outlined · text

Sizes: 32, 40 and 56px. Press one: its corners tighten and spring back

Round and square · a toggle trades one shape for the other once selected

Disabled, with the reason beside it

Add a title to save

The design

The Kanso design system's own drawing of it, in HTML and CSS with kanso-ui's tokens: the look kanso-ui's component moves to with its family's release.

When to use

Use a button when a press does something. Two rules set its weight.

  • One accent action per screen. k-btn--accent is the single action the screen exists for: "Continue" on a project. With a spotlight card on screen, its main action is the highlight and no button is accent.
  • Ink is the strong action. k-btn--ink is the main action everywhere else: "Mark as done" in a confirmation sheet, "Save" in the form, "Add" in the web app bar.

Use Link to go somewhere, IconButton when an icon alone is clear, Fab for the floating "Add" on phones, and SegmentedControl or Chip to choose or filter.