Variants

Four visual styles, one hierarchy rule: only one primary button per section. Everything else supports it.

Primary — variant="solid" intent="primary"

Secondary — variant="outline" intent="secondary"

Ghost — variant="ghost"

Danger — variant="solid" intent="danger"

Icons

Buttons accept a leading icon, a trailing icon, both, or neither. Icon-only buttons need an ariaLabel.

Leading icon

Trailing icon

Icon only

Disabled

Parts

  • .source-button Root interactive element
  • .source-button-label Text label inside the button
  • .source-button-icon Optional leading or trailing icon slot
  • .source-button-spinner Loading spinner when loading is true

States

StateAppearance
DefaultUses variant and palette defaults.
HoverBackground shifts to the configured hover token.
Focus2px focus-visible ring with palette focus color.
DisabledMuted opacity and not-allowed cursor.
LoadingSpinner shown, interaction blocked.