Design Principles
Core guidelines that shape every interaction, component, and visual decision within the Webui ecosystem.
Clarity First
Interfaces should communicate intent instantly. Reduce cognitive load through hierarchy, whitespace, and precise language.
Consistent Patterns
Predictable interactions build trust. Reuse proven components and maintain strict token alignment across all products.
Accessible by Default
Every color contrast, focus state, and touch target meets WCAG 2.1 AA standards without requiring manual overrides.
Color Palette
A semantic, accessible color system built on a primary violet spectrum with neutral grays and functional states.
Primary
Functional
Usage Guidelines
Use --primary-500 as the default interactive color. Reserve --primary-600/700 for active/pressed states. Neutral grays handle backgrounds, text, and borders. Always validate contrast ratios before deploying new color combinations.
Typography
Inter for UI, JetBrains Mono for code. A fluid scale optimized for readability across devices.
Spacing & Grid
A base-4 scale ensures rhythm and alignment across all layouts. All padding/margin values should derive from this scale.
Layout Rules
- Use
space-4for component internal padding - Use
space-6for section gaps - Container max-width: 1200px, 12-column grid, 24px gutters
Components
Production-ready UI building blocks with consistent states, variants, and accessibility baked in.
Buttons
Inputs & Forms
Feedback
Surfaces
Content Card
Elevated surface with hover states for data visualization and media.
Interaction Patterns
Documented behaviors that ensure predictable, accessible experiences across all touchpoints.
Form Validation
Validate on blur, not on input. Display error messages below the field with --error-700 text and --error-50 background. Never block submission without inline guidance.
Focus Management
All interactive elements must have a visible focus ring. Use outline: 2px solid var(--primary-500) with outline-offset: 2px. Trap focus in modals and dialog flows.
Responsive Behavior
Breakpoints: sm: 640px, md: 768px, lg: 1024px, xl: 1280px. Stack columns vertically below 768px. Collapse navigation into drawers. Scale typography fluidly using clamp().