Overview
The application is built with responsive design principles, ensuring optimal user experience across desktop, tablet, and mobile devices.Responsive Breakpoints
Tailwind Breakpoints
The system uses Tailwind CSS responsive breakpoints:- sm: 640px - Small tablets and large phones
- md: 768px - Tablets
- lg: 1024px - Laptops and small desktops
- xl: 1280px - Desktops
- 2xl: 1536px - Large desktops
Layout Adaptations
Grid Layouts
Responsive grid columns:- Card displays
- Summary statistics
- Report sections
Form Layouts
Responsive form grids:~/workspace/source/src/pages/Register.tsx:160-171
Forms stack vertically on mobile, split into columns on larger screens.
Component Responsiveness
Dialog Sizing
Dialogs adapt to screen size:~/workspace/source/src/pages/Calendario.tsx:252
Card Headers
Flexible card layouts:~/workspace/source/src/pages/Finanzas.tsx:455-459
Page Headers
Responsive headers with actions:~/workspace/source/src/pages/Calendario.tsx:112-124
Filter Bar Responsiveness
Flexible Filter Layout
~/workspace/source/src/pages/Calendario.tsx:126-137
Filters:
- Center-aligned on mobile
- Right-aligned on larger screens
- Wrap to multiple rows as needed
Table Responsiveness
Horizontal Scroll
Tables scroll horizontally on small screens:~/workspace/source/src/pages/Finanzas.tsx:811-812
Maintains table structure while allowing horizontal scrolling on mobile.
Button Adaptations
Icon-Only on Mobile
Buttons can show icons only on small screens:Authentication Pages
Centered Mobile Layout
~/workspace/source/src/pages/Login.tsx:72-73
Centered layout with padding ensures good presentation on all devices.
Chart Responsiveness
Responsive Containers
Charts adapt to container width:~/workspace/source/src/pages/Finanzas.tsx:544-548
Font Sizing
Smaller fonts on charts for mobile:~/workspace/source/src/pages/Finanzas.tsx:553-554
Calendar Responsiveness
View Recommendations
From README:- Use Day view on desktop for detailed work
- Use Month/Week view on mobile for overview
- Cards view better than table on mobile
Text Responsiveness
Font Sizes
Text adapts to screen size:~/workspace/source/src/pages/Login.tsx:75-79
Truncation
Long text truncates on small screens:~/workspace/source/src/pages/Finanzas.tsx:763-765
Spacing System
Consistent Spacing
Tailwind spacing classes ensure consistency:- Padding:
p-4,px-6,py-3 - Margins:
mb-6,mt-4,gap-4 - Responsive:
sm:p-6,md:gap-8
Space-Y for Vertical Stacking
Flex Layouts
Flex Wrap
Flex containers wrap on smaller screens:Flex Direction Changes
Mobile Navigation
Compact Controls
Calendar controls adapt for mobile:Touch Targets
Adequate Sizing
Buttons and interactive elements sized for touch:~/workspace/source/src/pages/Login.tsx:147
Minimum 44x44px touch targets for mobile accessibility.
Loading States
Responsive Spinners
~/workspace/source/src/components/auth/ProtectedRoute.tsx:16-18
Loading indicators work well on all screen sizes.
Best Practices
- Mobile First - Design for mobile, enhance for desktop
- Test All Sizes - Verify on phone, tablet, desktop
- Touch Friendly - Large enough tap targets (44x44px minimum)
- Readable Text - Minimum 16px body text on mobile
- Scrollable Tables - Allow horizontal scroll for data tables
- Flexible Grids - Use responsive grid columns
- Stack on Mobile - Vertical layouts for narrow screens
- Wrap Content - Allow content to wrap naturally
- Responsive Images - Images scale to container
- Test Orientations - Check portrait and landscape
Testing Responsive Design
Browser DevTools
- Open Chrome DevTools (F12)
- Click device toolbar icon (Ctrl+Shift+M)
- Test different device presets:
- iPhone SE (375px)
- iPhone 12 Pro (390px)
- iPad (768px)
- Desktop (1920px)
Real Device Testing
Test on actual devices:- Small phone (iPhone SE)
- Large phone (iPhone Pro Max)
- Tablet (iPad)
- Desktop (various sizes)