{title}
{description}
--- id: patricio0312rev/skills/responsive-design-system version: "59d5370a" license: MIT install: manual updated: 2026-01-12 --- # responsive-design-system — Create layouts that adapt seamlessly across devices using mobile-first principles and Tailwind CSS. This skill covers breakpoint configuration, fluid typography with CSS clamp, container queries for component-level responsiveness, and production-ready layout patterns. Publisher: patricio0312rev · Stars: 52 · Updated: 2026-01-12 Install (manual): `git clone https://github.com/patricio0312rev/skills` ## SKILL.md # Responsive Design System Build adaptive, mobile-first layouts with modern CSS features and Tailwind. ## Core Workflow 1. **Define breakpoints**: Establish responsive breakpoint system 2. **Set fluid typography**: Clamp-based responsive fonts 3. **Create layout grid**: Responsive grid system 4. **Add container queries**: Component-level responsiveness 5. **Build responsive components**: Adaptive patterns 6. **Test across devices**: Verify on all viewports ## Breakpoint System ### Tailwind Default Breakpoints | Breakpoint | Min Width | Target Devices | |------------|-----------|----------------| | `sm` | 640px | Large phones (landscape) | | `md` | 768px | Tablets | | `lg` | 1024px | Laptops | | `xl` | 1280px | Desktops | | `2xl` | 1536px | Large screens | ### Custom Breakpoints ```javascript // tailwind.config.js module.exports = { theme: { screens: { 'xs': '475px', 'sm': '640px', 'md': '768px', 'lg': '1024px', 'xl': '1280px', '2xl': '1536px', '3xl': '1920px', // Max-width breakpoints 'max-sm': { max: '639px' }, 'max-md': { max: '767px' }, 'max-lg': { max: '1023px' }, // Range breakpoints 'tablet': { min: '768px', max: '1023px' }, // Feature queries 'touch': { raw: '(hover: none) and (pointer: coarse)' }, 'stylus': { raw: '(hover: none) and (pointer: fine)' }, 'mouse': { raw: '(hover: hover) and (pointer: fine)' }, }, }, }; ``` ## Fluid Typography ### CSS Clamp Function ```css /* globals.css */ :root { /* Fluid type scale: min, preferred, max */ --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem); --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem); --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem); --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem); --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem); --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); --text-3xl: clamp(1.875rem, 1.4rem + 2.25vw, 2.5rem); --text-4xl: clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem); --text-5xl: clamp(3rem, 1.8rem + 6vw, 5rem); /* Fluid spacing */ --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem); --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem); --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem); --space-lg: clamp(1.5rem, 1rem + 2.5vw, 3rem); --space-xl: clamp(2rem, 1.2rem + 4vw, 5rem); } ``` ### Tailwind Fluid Typography ```javascript // tailwind.config.js const plugin = require('tailwindcss/plugin'); module.exports = { theme: { extend: { fontSize: { 'fluid-xs': 'clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem)', 'fluid-sm': 'clamp(0.875rem, 0.8rem + 0.35vw, 1rem)', 'fluid-base': 'clamp(1rem, 0.9rem + 0.5vw, 1.125rem)', 'fluid-lg': 'clamp(1.125rem, 1rem + 0.6vw, 1.25rem)', 'fluid-xl': 'clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)', 'fluid-2xl': 'clamp(1.5rem, 1.2rem + 1.5vw, 2rem)', 'fluid-3xl': 'clamp(1.875rem, 1.4rem + 2.25vw, 2.5rem)', 'fluid-4xl': 'clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem)', 'fluid-5xl': 'clamp(3rem, 1.8rem + 6vw, 5rem)', }, }, }, }; ``` ### Usage ```html
Body text that scales smoothly.
``` ## Container Queries ### Enable Container Queries ```javascript // tailwind.config.js module.exports = { theme: { extend: { containers: { 'xs': '320px', 'sm': '384px', 'md': '448px', 'lg': '512px', 'xl': '576px', '2xl': '672px', }, }, }, }; ``` ### Container Query Usage ```htmlCard content
{description}
```
### Next.js Image
```tsx
import Image from 'next/image';
export function ResponsiveImage({ src, alt }: ImageProps) {
return (
| {header} | ))}
|---|
| {cell} | ))}
Content with responsive spacing