Components

← All components

Button

src/lib/components/button.tsx·variant (primary · secondary · soft · ghost · destructive) · size (sm · md · lg) · icon · iconOnly · href · fullWidth · disabled

Guide

tentative
  • primary — the main forward action ("Continue", "Continue to deployment").
  • secondary — neutral header actions ("Documentation", "Notification").
  • soft — "Contact Sales". muted — "Save draft". ghost — "Back".
  • sm for header actions; lg for a step footer.
  • Give the label as a string and any icon through the icon prop (planned contract).
  • Set the native type.
  • disabled: "focusable" while a button waits on its own press ("Starting…", Continue waiting on a check): it ignores presses but keeps focus, so keyboard users aren't dropped onto the page.
  • No loading state — Button has none, by decision.
  • No minimum width: the 162px "wide" size was dropped.
  • No className or style to change its look — a new look is a new variant.

Related: PanelSources: src/lib/components/button.tsx · docs/decisions/0001-component-contracts.md · docs/decisions/0003-units-spacing-and-no-overrides.md

variant=primary size=sm

variant=primary size=md

variant=primary size=lg

variant=secondary size=sm

variant=secondary size=md

variant=secondary size=lg

variant=soft size=sm

variant=soft size=md

variant=soft size=lg

variant=ghost size=sm

variant=ghost size=md

variant=ghost size=lg

variant=destructive size=sm

variant=destructive size=md

variant=destructive size=lg

variant=primary disabled

variant=secondary disabled

variant=soft disabled

variant=ghost disabled

variant=destructive disabled

icon=Plus size=sm

icon=Plus size=md

icon=Plus size=lg

icon=ArrowRight iconPosition=end

iconOnly variant=ghost size=sm

iconOnly variant=ghost size=md

iconOnly variant=ghost size=lg

iconOnly variant=primary

iconOnly variant=secondary

iconOnly variant=soft

iconOnly variant=destructive

iconOnly disabled

href (link)

href disabled

fullWidth