Specifications · master reference
The single bottom-line reference for applying this system to prototypes and product. Everything here restates, in exact values, what the section cards above document in context: usage (when to reach for what), design (tokens and dimensions), and interaction (states and motion). If a surface disagrees with this card, the surface is wrong.
| Foundation | Specification |
|---|---|
| Color | Primary --cane-600 #1B5E3F (dark theme: --cane-400) · accent --gold-400 #D9A323 · danger #D2453B · green-tinted neutrals. Product code uses aliases only (--surface, --text, --primary, --border…); [data-theme="dark"] flips them all. |
| Contrast | Body text ≥ 4.5:1, large text & icons ≥ 3:1 — on both themes. Status = color plus label, never color alone. |
| Type | --font-sans CS PraJad (UI, Thai+Latin) · --font-display Roboto (headings) · --font-mono JetBrains Mono (all numbers/IDs, tabular lining). Body 15px/1.5; dense tables 13px; headings semibold, --lh-tight 1.15; ALL-CAPS only at 11px micro labels with --ls-caps. |
| Spacing | 4px grid, --space-1…24 (4→96px). Portal density = space-1…4; marketing = space-12…24. No raw px where a token exists. |
| Radius | Controls/badges/avatars --radius-md 2px · cards --radius-lg 3px · overlays 4–6px · --radius-pill only switches, progress bars, presence dots. |
| Elevation | Border-first: 1px --border defines the edge; shadows --shadow-xs…xl are green-tinted rgba(15,32,24,…). Portal flat/xs–sm · marketing md · overlays lg–xl. |
| Motion | --dur-fast 140ms hover/focus · --dur-base 200ms fades · --dur-slow 320ms panels; --ease-standard cubic-bezier(.2,0,0,1); --ease-spring only binary toggles; all durations → 0ms under reduced motion. |
| Z-index | sticky 100 · dropdown 400 · overlay 800 · modal 900 · toast 1000 · tooltip 1100 — via --z-* only. |
| Icons | In-house set only (components/core/icons.js): 24px grid, stroke 1.5, currentColor; 16px dense · 18px default · 20px+ nav/mobile. Bespoke SVG = logo + motif only. |
| State | Treatment |
|---|---|
| Hover | Fill/border shifts one step — --primary-hover on solids, --surface-2/3 on quiet controls and rows — over --dur-fast. Interactive cards lift 1px and gain a shadow step. |
| Press / active | Darker fill (--primary-active) + translateY(.5px) scale(.99) — decisive, no bounce. |
| Focus (keyboard) | --shadow-focus: 2px surface-offset ring + soft cane glow, on :focus-visible. Always visible, never removed; wraps whole input groups. |
| Selected | --primary-soft tint with --primary text/rail — rows, nav items, choice cards, segmented tabs. |
| Disabled | --surface-3 fill + --text-muted label, no pointer events — never 50% opacity. |
| Loading | Keeps variant colors, blocks input; buttons show the spinner, tables show .sc-skel shimmer matching final layout. |
| Toggle | Switch thumb, radio dot and checkbox tick use --ease-spring overshoot — the only spring in the system. |
| Overlays | Scrim fades + panel rises/slides, --dur-base --ease-standard; Esc and scrim click close; focus trapped, returned to trigger on close. |
| Pattern | Use | Never |
|---|---|---|
| Select / dropdown | <Select> · .sc-selectwrap + scEnhanceSelects() | the OS option popup |
| Status pill | <Badge tone> / .sc-badge--<tone> — 2px radius, no leading dots | hand-styled span, half-circle pills |
| Button | <Button> / .sc-btn — xs 28 → xl 56px | raw styled <button>/<a> |
| Input & field | <Input> / .sc-field + .sc-input (40px) | bare <input> without the shell |
| Icon | <Icon> / data-sc-icon — in-house set | one-off inline SVG, icon CDNs |
| Avatar + presence | <Avatar name status> — square, 2px radius | circle + absolute dot |
| Data table | .sc-table chrome / <Table> compound | unstyled table, ad-hoc grid |
| Pagination | <Pager> / .sc-pager | custom prev/next rows |
| Toast / Alert / Tooltip | <Toast> / <Alert> / <Tooltip> | inline notification boxes |
| Trend chart | <Sparkline> — full-bleed, 1:1 geometry | hand-rolled or stretched SVG charts |
| Color & spacing | var(--…) tokens | raw hex / px where a token exists |
--container-lg/xl (1100/1320px), generous space-12…24, raised cards, gold CTAs, cane→dark-cane gradient heroes only.templates/portal · mobile · website — the starting points consuming projects copy for prototypes.styles.css → tokens/ (colors, typography, spacing, fonts, base) — link one file, get everything.components/*.css classes + React via _ds_bundle.js → window.SugarcaneDesignSystem_c153e7; per-component notes in *.prompt.md.guidelines/MANDATES.md (registry + adherence log) · CLAUDE.md (binding) · _adherence.oxlintrc.json (machine checks) · full prose reference in readme.md.