Components · usage & specs

Components

Every pattern here is mandated: the canonical React component (window.SugarcaneDesignSystem_c153e7) or its vanilla class is the only implementation allowed — see the Governance card and guidelines/MANDATES.md for the registry.

01Design specsexact values — tokens first
button<Button> / .sc-btn — sizes xs 28 · sm 32 · md 40 · lg 48 · xl 56px, radius 2px. One primary per view; gold = marketing CTA; danger = destructive only. Bordered on light; borderless allowed on dark.
badge<Badge tone> — the only status pill. Radius always 2px (--pill = wide padding, never half-circle); content = text or system icon + text, no leading dots.
avatar<Avatar name status> — square 2px-radius face, auto initials, deterministic fill; presence only via status.
icon<Icon name> — in-house set, 24px grid, stroke 1.5, currentColor. 16px dense · 18px default · 20px+ nav/mobile. No 3rd-party icon CDNs.
stat + sparkline<Stat>: mono tabular value + uppercase label + delta arrow; accent tints the icon chip. <Sparkline>: full-bleed, 1:1 geometry, trend-colored — the only inline chart.
data<Table> compound + <Pager> + <TableEmpty> on the .sc-table chrome — see the Tables chapter for the full behavioral spec.
feedbackAlert inline-persistent · Toast transient (--z-toast) · Tooltip one-line hint · EmptyState icon + sentence + one action · ProgressBar determinate.
overlayDialog (one decision, --z-modal) · Offcanvas edge panel, blocking or non-blocking. Esc + scrim close; focus trapped and returned.
02Usage rulesdo / don’t
Do
  • Read components from the DS bundle; compose — don’t fork
  • Match density: 13px text and compact controls inside portal tables
  • Give icon-only buttons a label (aria) via <IconButton>
  • Log any new reusable pattern as a Registry row in MANDATES.md
Don’t
  • Re-implement a mandated pattern ad-hoc or ship a native OS control (selects!)
  • Hand-style a colored span as a status pill
  • Draw one-off inline SVG icons or charts
  • Use half-circle radii on badges or avatars
03Interaction specsstates & motion
hoverFill darkens one step (--primary-hover / --surface-2/3), --dur-fast; interactive cards lift 1px + shadow.
presstranslateY(.5px) scale(.99) + active fill.
focus--shadow-focus ring on every control, keyboard-only.
disabled--surface-3 + --text-muted, no pointer events; loading keeps variant colors and only blocks input.
spring--ease-spring overshoot is reserved for binary toggles (switch thumb, radio dot, checkbox tick).

Full written reference: readme.md · mandates: guidelines/MANDATES.md · master card: Specifications group at the bottom of this tab.