# SecuBox Responsive Design Guide Complete guide to building responsive interfaces with SecuBox utility classes. ## Table of Contents 1. [Breakpoints](#breakpoints) 2. [Utility Classes](#utility-classes) 3. [Responsive Patterns](#responsive-patterns) 4. [Component Examples](#component-examples) 5. [Best Practices](#best-practices) --- ## Breakpoints SecuBox uses a **mobile-first** approach with 4 breakpoints: | Breakpoint | Min Width | Target Devices | Prefix | |------------|-----------|----------------|--------| | **Mobile** | 0px | Phones | *(none)* | | **Small** | 480px | Large phones | `cyber-sm:` | | **Medium** | 768px | Tablets | `cyber-md:` | | **Large** | 1024px | Small desktops | `cyber-lg:` | | **Extra Large** | 1200px | Large desktops | `cyber-xl:` | ### Breakpoint Media Queries ```css /* Mobile-first (no prefix needed) */ .cyber-hidden { display: none; } /* Small devices and up (≥480px) */ @media (min-width: 480px) { .cyber-sm\:block { display: block; } } /* Medium devices and up (≥768px) */ @media (min-width: 768px) { .cyber-md\:flex { display: flex; } } /* Large devices and up (≥1024px) */ @media (min-width: 1024px) { .cyber-lg\:grid { display: grid; } } /* Extra large devices and up (≥1200px) */ @media (min-width: 1200px) { .cyber-xl\:inline { display: inline; } } ``` --- ## Utility Classes ### Spacing #### Margin ```css /* All sides */ .cyber-m-0, .cyber-m-xs, .cyber-m-sm, .cyber-m-md, .cyber-m-lg, .cyber-m-xl, .cyber-m-2xl /* Individual sides */ .cyber-mt-* /* margin-top */ .cyber-mb-* /* margin-bottom */ .cyber-ml-* /* margin-left */ .cyber-mr-* /* margin-right */ /* Axis */ .cyber-mx-* /* margin-left + margin-right */ .cyber-my-* /* margin-top + margin-bottom */ ``` #### Padding ```css /* All sides */ .cyber-p-0, .cyber-p-xs, .cyber-p-sm, .cyber-p-md, .cyber-p-lg, .cyber-p-xl, .cyber-p-2xl /* Individual sides */ .cyber-pt-*, .cyber-pb-*, .cyber-pl-*, .cyber-pr-* /* Axis */ .cyber-px-*, .cyber-py-* ``` #### Spacing Scale | Class Suffix | Value | Pixels | |--------------|-------|--------| | `0` | 0 | 0px | | `xs` | 0.25rem | 4px | | `sm` | 0.5rem | 8px | | `md` | 1rem | 16px | | `lg` | 1.5rem | 24px | | `xl` | 2rem | 32px | | `2xl` | 3rem | 48px | ### Display ```css .cyber-hidden /* display: none */ .cyber-block /* display: block */ .cyber-inline-block /* display: inline-block */ .cyber-flex /* display: flex */ .cyber-inline-flex /* display: inline-flex */ .cyber-grid /* display: grid */ ``` ### Flexbox #### Direction ```css .cyber-flex-row /* flex-direction: row */ .cyber-flex-col /* flex-direction: column */ ``` #### Wrap ```css .cyber-flex-wrap /* flex-wrap: wrap */ .cyber-flex-nowrap /* flex-wrap: nowrap */ ``` #### Justify Content ```css .cyber-justify-start /* justify-content: flex-start */ .cyber-justify-center /* justify-content: center */ .cyber-justify-end /* justify-content: flex-end */ .cyber-justify-between /* justify-content: space-between */ .cyber-justify-around /* justify-content: space-around */ .cyber-justify-evenly /* justify-content: space-evenly */ ``` #### Align Items ```css .cyber-items-start /* align-items: flex-start */ .cyber-items-center /* align-items: center */ .cyber-items-end /* align-items: flex-end */ .cyber-items-stretch /* align-items: stretch */ .cyber-items-baseline /* align-items: baseline */ ``` #### Gap ```css .cyber-gap-0, .cyber-gap-xs, .cyber-gap-sm, .cyber-gap-md, .cyber-gap-lg, .cyber-gap-xl ``` ### Grid #### Grid Columns ```css .cyber-grid-cols-1 /* grid-template-columns: repeat(1, 1fr) */ .cyber-grid-cols-2 /* grid-template-columns: repeat(2, 1fr) */ .cyber-grid-cols-3 /* ... through 12 */ ``` #### Column Span ```css .cyber-col-span-1 /* grid-column: span 1 */ .cyber-col-span-2 /* grid-column: span 2 */ .cyber-col-span-3 /* ... through 12 */ ``` #### Grid Rows ```css .cyber-grid-rows-1 /* grid-template-rows: repeat(1, 1fr) */ .cyber-grid-rows-2 /* ... through 6 */ ``` ### Typography #### Font Size ```css .cyber-text-xs /* font-size: 0.75rem (12px) */ .cyber-text-sm /* font-size: 0.875rem (14px) */ .cyber-text-base /* font-size: 1rem (16px) */ .cyber-text-lg /* font-size: 1.125rem (18px) */ .cyber-text-xl /* font-size: 1.25rem (20px) */ .cyber-text-2xl /* font-size: 1.5rem (24px) */ .cyber-text-3xl /* font-size: 1.875rem (30px) */ .cyber-text-4xl /* font-size: 2.25rem (36px) */ ``` #### Text Alignment ```css .cyber-text-left /* text-align: left */ .cyber-text-center /* text-align: center */ .cyber-text-right /* text-align: right */ ``` #### Font Weight ```css .cyber-font-normal /* font-weight: 400 */ .cyber-font-medium /* font-weight: 500 */ .cyber-font-semibold /* font-weight: 600 */ .cyber-font-bold /* font-weight: 700 */ ``` #### Text Transform ```css .cyber-uppercase /* text-transform: uppercase */ .cyber-lowercase /* text-transform: lowercase */ .cyber-capitalize /* text-transform: capitalize */ ``` --- ## Responsive Patterns ### Pattern 1: Mobile-First Layout ```html
Column 1
Column 2
Column 3
``` ### Pattern 2: Conditional Display ```html
Desktop-only content
Mobile-only content
``` ### Pattern 3: Responsive Spacing ```html
Content with responsive padding
``` ### Pattern 4: Flexible Text Size ```html

Responsive Heading

``` ### Pattern 5: Responsive Flexbox ```html
Item 1
Item 2
``` --- ## Component Examples ### Example 1: Responsive Card Grid ```html
Card 1
Card 2
Card 3
Card 4
``` ### Example 2: Responsive Navigation ```html ``` ### Example 3: Responsive Dashboard ```html

Dashboard

Stat 1
Stat 2
Stat 3
Stat 4
Main Content
Sidebar
``` ### Example 4: Responsive Form ```html
``` ### Example 5: Responsive Table ```html
Name Status Version Actions
App Name Running 1.2.3
``` --- ## Best Practices ### 1. Mobile-First Approach Always start with mobile styles, then add desktop enhancements: ```html
Text grows on larger screens
More complex
``` ### 2. Use Semantic Breakpoints Choose breakpoints based on content, not devices: ```html
``` ### 3. Consistent Spacing Use spacing scale consistently: ```html
``` ### 4. Touch-Friendly Targets Ensure buttons/links are 44px minimum on mobile: ```css /* Mobile touch target */ .cyber-btn { min-height: 44px; padding: 0.65rem 1rem; } ``` ### 5. Test on Real Devices Test your responsive design on: - Mobile (375px, 414px) - Tablet (768px, 1024px) - Desktop (1280px, 1920px) --- ## Common Patterns Reference ### Centered Container ```html
``` ### Sidebar Layout ```html
Main Content
``` ### Hero Section ```html

Hero Title

Subtitle

``` --- ## Troubleshooting ### Responsive Classes Not Working 1. **Check class name spelling**: `cyber-md:flex` not `cyber-md-flex` 2. **Verify viewport meta tag**: ```html ``` 3. **Clear browser cache**: Ctrl+F5 ### Layout Breaking on Specific Size 1. Use browser DevTools responsive mode 2. Check element widths with `max-width: 100%` 3. Look for fixed widths that should be responsive ### Text Overflowing ```css /* Add text wrapping */ .cyber-text-wrap { word-wrap: break-word; overflow-wrap: break-word; } ``` --- **Author**: SecuBox Team **Version**: 1.0.0 **Last Updated**: 2026-01-05