| ← All Docs UI Design System

UI Design System

Last updated Sep 2026 23 components · 7 branch themes

Color Palette

Primary

Primary #0052cc
Primary Light #3385ff
Primary Dark #003380

Accent

Accent #ea8e1b
Accent Light #f6b14f

Semantic

Success #1fa971
Danger #d64545
Warning #d97706

Surfaces

Surface #e7f5ff
Surface Muted #d8eefc
Card #ffffff
Background #f7f9fc

Text

Primary #173042
Secondary #5d7486
Muted #8ba0af

Border

Border #d9e5ee

Branch Theming

Each branch gets a color_theme value stored in the branches table. The theme color is applied to the sidebar accent, active/selected states, and branch indicator badges throughout the UI.

ThemePrimary ColorUse
Blue#0052ccDefault theme
Green#16a34aAgriculture/organic focus
Orange#ea580cWarm/energetic branding
Teal#0d9488Calm/professional tone
Purple#7c3aedPremium/distinct branches
Rose#e11d48Bold/attention-grabbing
Slate#475569Neutral/understated

Typography

Design Tokens

TokenValueUsage
--card-radius1.25rem (20px)Card border radius
--card-radius-lg1.5rem (24px)Large card/modal radius
--page-gutterclamp(1rem, 3vw, 1.5rem)Page horizontal padding
--shadow-soft0 1px 3px rgba(0,0,0,.06)Subtle elevation
--shadow-card0 2px 8px rgba(0,0,0,.08)Card default shadow
--shadow-card-hover0 4px 16px rgba(0,0,0,.12)Card hover state
--safe-bottomenv(safe-area-inset-bottom)iOS home indicator

Core Components

ComponentVariants / PropsNotes
Button9 variants (primary, secondary, accent, danger, ghost, outline, success, dark, darkOutline), 3 sizes (sm, md, lg), loading state, 400ms debounceMost used component
Input3 sizes, label, error message, helper text, left/right icons, password toggleControlled components only
CardDefault with shadow, hover variant, clickable variant1.25rem border-radius
SelectNative select wrapper, label, error stateNo custom dropdown
Badge6 color variants (success, danger, warning, info, neutral, accent)Uppercase, 11px
Skeleton4 types (line, circle, card, table row)Pulse animation
TextareaAuto-resize, character count, max lengthSame styling as Input
SearchableSelectDropdown with search filter, async loadingUsed for farmer/product selection
ConfirmModalDestructive action confirmation, customizable messageRed confirm button for danger actions
SearchBar250ms debounce, clear button, search iconUsed in all list views
FarmerAvatarInitials-based avatar, color derived from name hash2 sizes
CalendarMonth view, date selection, event indicatorsCustom built (no library)
AquaLoaderFull-screen and inline variants, water drop animationBrand-themed loading
BranchColorPicker7 theme color selection, visual previewUsed in branch settings
EmptyStateIllustration + message + action buttonConsistent empty states
DatePickerSingle date selection, min/max constraintsNative input[type=date] on mobile
DateRangeFilterPreset ranges (Today, 7d, 30d, Custom)Used in reports/lists
SyncStatusIndicatorOnline/offline/syncing statesShows in header area
UniversalSearchModalCtrl+K triggered, searches farmers/products/billsKeyboard navigable
NotificationsDropdownBell icon, unread count badgeStock alerts, system notices
ListLoadMore"Load more" button with loading stateReplaces infinite scroll
ReloadPromptPWA update available notification"New version available" toast
ModalPortal-based, focus trap, escape close, slide-up on mobile / scale-in on desktopUses Radix Dialog primitives

Notifications

Icons

Dark Mode

Not supported. Dark mode is not supported. The app uses color-scheme: light hardcoded in the HTML root. All color tokens assume a light background.