Loading...
Loading...
Design layouts that adapt to different screen sizes using constraints, auto layout, and responsive techniques.
Set up multiple frames for breakpoints: Create frames for Desktop (1440px), Tablet (768px), and Mobile (375px). Name them clearly. This helps you design for each screen size.
Use Auto Layout for flexible containers: Wrap sections in Auto Layout frames (Shift+A). Set resizing to 'Fill container' for elements that should stretch, or 'Hug contents' for elements that size to their content.
Apply Constraints to layers: Select an element, in the right sidebar find 'Constraints'. Set horizontal constraint to 'Left and Right' (element stretches), 'Center' (stays centered), or 'Scale' (grows proportionally).
Design mobile-first or desktop-first: Start with one breakpoint, then duplicate the frame and adjust for other sizes. Use 'Instance Swap' to replace desktop components with mobile-optimized versions.
Use responsive text: For headings, create separate text styles for each breakpoint (H1-Desktop: 48px, H1-Mobile: 32px). Apply the appropriate style based on screen size.
Test responsiveness: Resize your frame manually to see how elements react. Drag the frame edge and watch if elements reflow correctly. Fix any breaking points by adjusting constraints or auto layout settings.
Create variant components for responsive elements: For navigation, create a Desktop variant (horizontal menu) and Mobile variant (hamburger menu). Use component properties to swap between them based on breakpoint.