Specifications · master reference

cane agency — design specifications

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.

01Foundations at a glanceexact token values
FoundationSpecification
ColorPrimary --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.
ContrastBody 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.
Spacing4px grid, --space-1…24 (4→96px). Portal density = space-1…4; marketing = space-12…24. No raw px where a token exists.
RadiusControls/badges/avatars --radius-md 2px · cards --radius-lg 3px · overlays 4–6px · --radius-pill only switches, progress bars, presence dots.
ElevationBorder-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-indexsticky 100 · dropdown 400 · overlay 800 · modal 900 · toast 1000 · tooltip 1100 — via --z-* only.
IconsIn-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.
02Global interaction contractevery control, every state
StateTreatment
HoverFill/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 / activeDarker 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.
LoadingKeeps variant colors, blocks input; buttons show the spinner, tables show .sc-skel shimmer matching final layout.
ToggleSwitch thumb, radio dot and checkbox tick use --ease-spring overshoot — the only spring in the system.
OverlaysScrim fades + panel rises/slides, --dur-base --ease-standard; Esc and scrim click close; focus trapped, returned to trigger on close.
03Component mandatesuse this — never that (full registry: guidelines/MANDATES.md)
PatternUseNever
Select / dropdown<Select> · .sc-selectwrap + scEnhanceSelects()the OS option popup
Status pill<Badge tone> / .sc-badge--<tone> — 2px radius, no leading dotshand-styled span, half-circle pills
Button<Button> / .sc-btn — xs 28 → xl 56pxraw styled <button>/<a>
Input & field<Input> / .sc-field + .sc-input (40px)bare <input> without the shell
Icon<Icon> / data-sc-icon — in-house setone-off inline SVG, icon CDNs
Avatar + presence<Avatar name status> — square, 2px radiuscircle + absolute dot
Data table.sc-table chrome / <Table> compoundunstyled table, ad-hoc grid
Pagination<Pager> / .sc-pagercustom prev/next rows
Toast / Alert / Tooltip<Toast> / <Alert> / <Tooltip>inline notification boxes
Trend chart<Sparkline> — full-bleed, 1:1 geometryhand-rolled or stretched SVG charts
Color & spacingvar(--…) tokensraw hex / px where a token exists
04Surfaces & layout constantsportal · mobile · website
portalDesktop, data-dense: sidebar 264px (collapses to 64px), topbar 60px, table body 13px, compact controls. Light theme default; flat/hairline cards.
mobileField app: bottom tab bar, hit targets ≥ 44px, high contrast for sun/gloves; dark theme is the expected night default.
websiteMarketing: centered --container-lg/xl (1100/1320px), generous space-12…24, raised cards, gold CTAs, cane→dark-cane gradient heroes only.
templatesFull-screen templates live in templates/portal · mobile · website — the starting points consuming projects copy for prototypes.
05Content & language rulesvoice carries the brand too
languageThai-first — every product UI string is Thai; Latin for units, IDs and secondary labels. Address the user politely (คุณ).
toneCalm, concrete co-op officer: ตัน, ไร่, งวด, CCS, โควตา — past-tense facts (ส่งมอบแล้ว), no hype, no exclamation.
casingLatin UI labels in sentence case; ALL-CAPS only at 11px micro labels. Buttons verb-first: บันทึกการส่งมอบ.
numbersAlways mono tabular figures; Buddhist-era years fine farmer-facing (ฤดูกาล 2567/68). No emoji in product UI.
lengthLabels 1–3 words · hints one line · empty states = one friendly sentence + one clear action.
errorsOne concrete sentence, what happened + what to do; validate on blur, summary alert links to fields.
06Where the specs livesource of truth per layer
tokensstyles.css → tokens/ (colors, typography, spacing, fonts, base) — link one file, get everything.
componentscomponents/*.css classes + React via _ds_bundle.js → window.SugarcaneDesignSystem_c153e7; per-component notes in *.prompt.md.
usage notesEvery specimen card above ends in a Usage / Design / Interaction spec footer; each section also has a dedicated “usage & specs” card.
governanceguidelines/MANDATES.md (registry + adherence log) · CLAUDE.md (binding) · _adherence.oxlintrc.json (machine checks) · full prose reference in readme.md.