Skip to content
Design System
GitHub

Button

v0.17.1

Primary, secondary, outline, ghost, destructive and link; 36, 44 and 48 px; loading state with a delayed spinner.

Button variants

Install
npx shadcn add @syncrobotic/button

Also installs: radix-ui, class-variance-authority, @syncrobotic/cn, @syncrobotic/spinner

Overview

A control that does one thing now: save, send, start a mission. The label is a verb that says what happens.

When to use

  • The one primary action of a screen or dialog (primary).
  • Other actions beside it (secondary, outline, ghost).
  • An action that deletes or cannot be undone (destructive).

Use something else

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Button sizes

Button with icon

Robot is offline

Button states

Unsaved changes to “Night patrol”.

Button in a form

Button full width

Usage rules

  • One primary button per view. Primary is neutral high contrast, never blue or red.
  • Destructive is a danger outline and text. Solid red belongs to the emergency stop alone.
  • 44 px is the default. 36 px (sm) is for a mouse only: on a touch screen it is 44 px by itself. 48 px for a page's main action.
  • Name the result (“Delete route”), not the mechanism (“OK”, “Submit”).
  • Disabled says why, next to it or in the hint (“Robot offline: cannot dispatch”). Its words stay readable: filled buttons become a grey block; outline and destructive keep their outline with text-disabled; never opacity.

Changelog

  • 0.17.12026-11-19Disabled outline and destructive buttons keep their outline and lose the ink (--disabled text, border ring). They were a filled grey, which looked heavier than the enabled outline beside them, as in pagination.
  • 0.10.02026-11-18Disabled keeps its words readable: a grey field (bg-muted, muted text) on controls with a surface, solid disabled ink on items and icons; no more 50 % opacity, which washes text out in sunlight. A loading button keeps its look (busy is not unavailable) and still blocks a second press.
  • 0.8.02026-11-17The link variant is foreground with an underline (was blue): a link reads by its underline; blue means in progress.

How to upgrade