# UI Design Principles Documentation ## School For Schools Interface Design System This document serves as a comprehensive reference guide for understanding and implementing the design principles, visual elements, and user experience patterns used throughout the School For Schools interface. --- ## Table of Contents 1. [Core Design Principles](#core-design-principles) 2. [Visual Design Elements](#visual-design-elements) 3. [Component Patterns](#component-patterns) 4. [User Experience Principles](#user-experience-principles) 5. [Implementation Examples](#implementation-examples) 6. [Design System Architecture](#design-system-architecture) --- ## Core Design Principles ### 1. Minimalism & Clarity The interface prioritizes **clarity over decoration**. This philosophy manifests through: - **Clean layouts** with generous white space - **Focused content** that eliminates visual noise - **Purposeful elements** where every component serves a clear function - **Reduced cognitive load** through simplified navigation and information architecture **Rationale**: Educational platforms require users to process complex information. Minimalist design reduces distractions and helps users focus on essential content. ### 2. Visual Hierarchy Content is organized through **systematic visual weighting**: - **Typography scale** creates clear information levels (headings, body, captions) - **Color contrast** distinguishes primary actions from secondary elements - **Spatial relationships** guide the eye through content flow - **Size and weight** emphasize importance without overwhelming **Implementation**: The design uses a consistent type scale (4xl-7xl for hero headings, base for body text) and strategic use of the brand orange (`#F48120`) for emphasis. ### 3. Consistency & Standards **Unified design language** across all components: - **Shared color palette** applied consistently - **Standardized spacing** using Tailwind's spacing scale - **Component patterns** reused throughout the interface - **Interaction patterns** that users can predict and learn **Rationale**: Consistency reduces learning curve and builds user confidence. Once users understand one section, they can navigate the entire platform intuitively. ### 4. Accessibility First Design decisions prioritize **inclusive user experience**: - **Semantic HTML** structure for screen readers - **Color contrast ratios** that meet WCAG standards - **Keyboard navigation** support throughout - **Focus indicators** visible for keyboard users - **ARIA labels** where appropriate ### 5. Progressive Enhancement The interface is built with **graceful degradation**: - **Core functionality** works without JavaScript - **Enhanced interactions** layer on top of base functionality - **Responsive design** adapts to all device sizes - **Performance optimization** ensures fast load times --- ## Visual Design Elements ### Color Palette The design system uses a **dual-tone color approach** with OKLCH color space for modern color management and perceptual uniformity. #### Brand Colors ```css --color-orange: #f48120 /* Primary accent, CTAs, hover states */ --color-dark-grey: #353535 /* Primary text, headings */ --color-black: #000000 /* Deep emphasis */ --color-hero-bg: #eaeaea /* Section backgrounds, cards */ ``` **Usage Guidelines**: - **Orange (`#F48120`)**: Used sparingly for primary actions, hover states, active navigation items, and key accents. Creates visual interest without overwhelming. - **Dark Grey (`#353535`)**: Primary text color, headings, and important UI elements. Provides excellent readability. - **Hero Background (`#EAEAEA`)**: Section backgrounds and card containers. Creates subtle separation without harsh contrast. - **Black (`#000000`)**: Maximum emphasis, reserved for critical text and deep UI elements. #### Semantic Color System The system includes a comprehensive semantic color palette based on OKLCH: **Light Mode**: - `--background`: Pure white (`oklch(1 0 0)`) - `--foreground`: Near-black (`oklch(0.145 0 0)`) - `--primary`: Dark (`oklch(0.205 0 0)`) - `--secondary`: Light grey (`oklch(0.97 0 0)`) - `--muted`: Light grey (`oklch(0.97 0 0)`) - `--accent`: Light grey (`oklch(0.97 0 0)`) - `--border`: Light border (`oklch(0.922 0 0)`) - `--destructive`: Red accent (`oklch(0.577 0.245 27.325)`) **Dark Mode**: - Complete color inversion while maintaining contrast ratios - Perceptually uniform transitions between light and dark themes - Consistent brand orange remains prominent #### Color Usage Examples ```typescript // Primary Action Button className="bg-[#F48120] hover:bg-[#F48120]/90" // Text Emphasis className="text-[#353535]" // Section Background className="bg-[#EAEAEA]" // Card Container className="bg-white border border-gray-300" ``` ### Typography #### Font Family **Primary Font**: `DIN Alternate` ```css --font-sans: "DIN Alternate", "Geist", "Geist Fallback" ``` **Rationale**: DIN Alternate provides: - **Professional authority** appropriate for educational technology - **Excellent readability** at various sizes - **Geometric clarity** that aligns with technical content - **Modern aesthetic** without being overly decorative **Fallback Chain**: Geist and system fallbacks ensure graceful degradation across platforms. #### Type Scale The typography system uses a **responsive scale** that adapts to screen size: | Element | Mobile | Tablet | Desktop | Usage | |---------|--------|--------|---------|-------| | Hero Heading | `text-5xl` | `text-6xl` | `text-7xl` | Main page titles | | Section Heading | `text-4xl` | `text-5xl` | `text-6xl` | Section titles | | Card Title | `text-lg` | `text-xl` | `text-2xl` | Card headings | | Body Text | `text-sm` | `text-base` | `text-base` | Paragraph content | | Small Text | `text-xs` | `text-sm` | `text-sm` | Captions, meta | **Implementation Example**: ```tsx

Learning

``` #### Font Weights - **400 (Regular)**: Body text, descriptions - **700 (Bold)**: Headings, emphasis, important information **Usage Pattern**: Minimal weight variation maintains clarity while creating hierarchy through size and color. #### Line Height - **Tight** (`leading-tight`): Headings for compact, impactful display - **Relaxed** (`leading-relaxed`): Body text for comfortable reading - **Normal**: Default for UI elements ### Spacing & Layout System #### Container System The layout uses a **constrained width container system**: ```tsx // Standard Container
// Wide Container (for hero sections)
// Extra Wide Container
``` **Rationale**: - Prevents content from stretching too wide on large screens - Maintains optimal reading line length - Creates consistent margins across sections #### Responsive Padding Padding scales with screen size to optimize space usage: - **Mobile**: `px-4` (1rem / 16px) - **Tablet**: `sm:px-6` (1.5rem / 24px) - **Desktop**: `lg:px-8` (2rem / 32px) #### Vertical Spacing Section spacing follows a consistent rhythm: ```tsx // Standard Section className="py-12 md:py-20 lg:py-24" // Compact Section className="py-8 md:py-16" // Hero Section className="py-16 md:py-24" ``` **Principle**: Vertical rhythm creates visual breathing room and clearly separates content sections. #### Grid System The interface uses **CSS Grid** for two-dimensional layouts and **Flexbox** for one-dimensional alignment: ```tsx // Responsive Grid (Why SFS Section)
// Card Grid (Offerings)
// Testimonial Grid
``` **Breakpoint Strategy**: - **Mobile First**: Base styles target mobile, then enhance for larger screens - **Breakpoints**: `sm:` (640px), `md:` (768px), `lg:` (1024px) - **Gap Scaling**: Gap sizes increase with container size ### Visual Hierarchy Techniques #### Size Hierarchy 1. **Primary**: Hero headings (7xl) - Most important content 2. **Secondary**: Section headings (4xl-6xl) - Section identification 3. **Tertiary**: Card titles (lg-xl) - Content grouping 4. **Body**: Paragraph text (base) - Content consumption 5. **Meta**: Captions, labels (xs-sm) - Supporting information #### Color Hierarchy - **High Contrast**: Brand orange on key interactive elements - **Medium Contrast**: Dark grey for primary content - **Low Contrast**: Muted colors for secondary information #### Spatial Hierarchy - **Grouping**: Related items grouped with consistent spacing - **Separation**: Sections separated by background colors or significant spacing - **Alignment**: Consistent alignment creates visual structure #### Motion Hierarchy Animations are **purposeful and restrained**: - **Micro-interactions**: Hover states, transitions (300ms duration) - **Content transitions**: Animated content changes (500-800ms) - **Page transitions**: Smooth, non-distracting animations --- ## Component Patterns ### 1. Navigation Pattern The navigation follows a **horizontal menu pattern** with mobile-first responsive behavior: **Desktop**: - Horizontal menu with equal spacing (`space-x-8`) - Active state indicated by orange color - Hover transitions for feedback **Mobile**: - Hamburger menu icon - Collapsible drawer navigation - Full-width touch targets ```12:48:components/navbar.tsx {/* Desktop Navigation */}
{navItems.map((item) => ( {item.label} ))}
``` **Design Decisions**: - **Fixed height** (`h-20`) maintains consistency across pages - **Border separation** (`border-b border-gray-200`) subtly separates navigation from content - **Transition animations** (`transition-colors`) provide smooth feedback ### 2. Hero Section Pattern Hero sections use a **split-screen layout** with animated content: **Characteristics**: - Large, bold typography (5xl-7xl) - Animated content rotation (4.5s intervals) - SVG iconography with drawing animations - Fixed-height containers to prevent layout shift ```100:130:components/main-hero.tsx
{/* --- Left Column: Text --- */}

Learning

{/* Fixed Height Text Container to prevent jumping */}
``` **Key Features**: - **Fixed-height container** prevents content jumping during animations - **Fade + slide transitions** create smooth content changes - **Responsive grid** adapts from stacked (mobile) to side-by-side (desktop) ### 3. Feature Card Pattern Feature cards use a **hover transformation pattern**: ```97:112:components/hero-section.tsx

{feature.title}

{feature.description}

``` **Pattern Elements**: - **Group hover**: Entire card responds to hover - **Color transformation**: Background shifts from grey to orange - **Text inversion**: Text changes to white for contrast - **Smooth transitions**: 300ms duration for polished feel - **Minimum height**: Ensures consistent card sizing ### 4. Offering Card Pattern Larger offering cards use an **aspect-ratio square pattern**: ```33:63:components/our-offerings.tsx
{/* Icon */}
{/* Title */}

{offering.title}

{/* Description */}

{offering.description}

{/* Link */} {offering.linkText}
``` **Design Decisions**: - **Square aspect ratio**: Creates visual balance and consistency - **Centered content**: Uses flexbox to center content vertically - **Icon → Title → Description → Link**: Clear information hierarchy - **Dark hover state**: Inverts to dark background for dramatic effect ### 5. Testimonial Carousel Pattern Testimonials use a **sliding window carousel** with navigation controls: ```104:201:components/testimonials.tsx

Testimonials

{/* Navigation Buttons */} {/* Carousel Viewport */}
{visibleTestimonials.map((testimonial) => ( {/* Card Design: - White background - Padding around - Inner border that changes color on hover */}
``` **Pattern Features**: - **External navigation**: Buttons positioned outside content area - **Sliding animation**: Smooth fade + slide transitions - **Border hover effect**: Border color changes on hover - **Fixed card height**: Prevents layout shift during transitions - **Touch-friendly**: Large hit targets for mobile users ### 6. Infinite Marquee Pattern The "Trusted By" section uses a **seamless infinite scroll**: ```22:60:components/trusted-by.tsx {/* Infinite Marquee Container */}
{/* We need two sets of logos for seamless looping */} {/* Set 1 */} {SCHOOLS.map((school) => (
Partner School
))} {/* Set 2 (Duplicate) */} {SCHOOLS.map((school) => (
Partner School
))}
``` **Implementation Strategy**: - **Duplicate content**: Two identical sets of logos - **50% translation**: Animation moves exactly one set width - **Linear easing**: Creates seamless, continuous motion - **Performance**: Uses GPU-accelerated transforms ### 7. Button Component Pattern Buttons follow a **variant-based system** using class-variance-authority: ```7:37:components/ui/button.tsx const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { variants: { variant: { default: 'bg-primary text-primary-foreground hover:bg-primary/90', destructive: 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', outline: 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50', secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50', link: 'text-primary underline-offset-4 hover:underline', }, size: { default: 'h-9 px-4 py-2 has-[>svg]:px-3', sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5', lg: 'h-10 rounded-md px-6 has-[>svg]:px-4', icon: 'size-9', 'icon-sm': 'size-8', 'icon-lg': 'size-10', }, }, defaultVariants: { variant: 'default', size: 'default', }, }, ) ``` **Design Principles**: - **Accessibility**: Focus states, ARIA support, keyboard navigation - **Consistency**: Standardized sizes and spacing - **Flexibility**: Multiple variants for different contexts - **Icon support**: Automatic spacing adjustments for icons ### 8. Card Component Pattern Cards provide a **composable container system**: ```5:15:components/ui/card.tsx function Card({ className, ...props }: React.ComponentProps<'div'>) { return (
) } ``` **Composition Pattern**: - **Card**: Base container - **CardHeader**: Header section with title/description - **CardTitle**: Heading within card - **CardDescription**: Supporting text - **CardContent**: Main content area - **CardFooter**: Footer actions/info **Usage**: Allows flexible composition while maintaining consistent styling. --- ## User Experience Principles ### Navigation Structure #### Information Architecture The site follows a **shallow navigation hierarchy**: ``` Home ├── About ├── ERP ├── Tech Lab Setup ├── Resources └── Contact ``` **Rationale**: Flat structure reduces cognitive load and allows quick access to any section. #### Navigation Patterns 1. **Primary Navigation**: Horizontal menu (desktop), hamburger (mobile) 2. **Section Navigation**: Anchor links for long pages 3. **Breadcrumbs**: Not implemented (shallow structure doesn't require them) 4. **Footer Navigation**: Quick links for common destinations #### Mobile Navigation - **Hamburger menu**: Collapses navigation to save screen space - **Full-width items**: Touch-friendly targets - **Smooth transitions**: Slide-in animation for drawer - **Overlay behavior**: Menu overlays content when open ### Interaction Patterns #### Hover States **Consistent hover feedback** across all interactive elements: - **Links**: Color change to brand orange (300ms transition) - **Buttons**: Background opacity change (10% darker) - **Cards**: Background color transformation + shadow - **Icons**: Color change matching context **Implementation**: ```tsx // Link hover className="text-[#353535] hover:text-[#F48120] transition-colors" // Button hover className="bg-[#353535] hover:bg-[#F48120] transition-colors" // Card hover className="group hover:bg-[#F48120] transition-colors duration-300" ``` #### Click Feedback - **Visual feedback**: Immediate color change on click - **Transition animations**: Smooth state changes - **Loading states**: Spinners or disabled states for async actions - **Success feedback**: Visual confirmation when actions complete #### Animation Philosophy **Principle**: Animations should feel **natural and purposeful**, not decorative. **Guidelines**: - **Duration**: 300ms for micro-interactions, 500-800ms for content transitions - **Easing**: `ease-out` for most transitions (feels responsive) - **Reduced motion**: Respects `prefers-reduced-motion` media query - **Performance**: Uses GPU-accelerated properties (transform, opacity) **Example Implementation**: ```tsx // Smooth content transition ``` ### Accessibility Considerations #### Semantic HTML All components use **appropriate semantic elements**: - `