From harness-claude
Builds responsive layouts using Tailwind's mobile-first breakpoints, container queries, and fluid typography. Useful for mobile/tablet/desktop adaptations, container-responsive components, and screen-based visibility.
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeThis skill uses the workspace's default tool permissions.
> Build responsive layouts with Tailwind's mobile-first breakpoints, container queries, and fluid typography
Guides responsive layouts and mobile-first designs with Tailwind CSS using breakpoints, container queries, grids, typography, spacing, and visibility utilities.
Implements responsive layouts with container queries, fluid typography, CSS Grid, Flexbox, and mobile-first breakpoints for adaptive web interfaces across devices.
Provides Tailwind CSS patterns for responsive design and dark mode in 2025/2026, including mobile-first breakpoints, custom themes, grids, and typography scaling.
Share bugs, ideas, or general feedback.
Build responsive layouts with Tailwind's mobile-first breakpoints, container queries, and fluid typography
sm: means "640px and above", not "only small screens".@container) for components that should respond to their parent's width, not the viewport.max-*: prefix for max-width queries when you need to target only small screens.// Mobile-first responsive card grid
function ProductGrid({ products }: { products: Product[] }) {
return (
<div
className="
grid gap-4
grid-cols-1 /* mobile: single column */
sm:grid-cols-2 /* 640px+: two columns */
lg:grid-cols-3 /* 1024px+: three columns */
xl:grid-cols-4 /* 1280px+: four columns */
"
>
{products.map((p) => (
<ProductCard key={p.id} product={p} />
))}
</div>
);
}
// Responsive navigation
function Header() {
return (
<header className="flex items-center justify-between p-4">
<Logo />
{/* Hidden on mobile, visible on desktop */}
<nav className="hidden md:flex gap-6">
<NavLink href="/features">Features</NavLink>
<NavLink href="/pricing">Pricing</NavLink>
</nav>
{/* Visible on mobile, hidden on desktop */}
<MobileMenuButton className="md:hidden" />
</header>
);
}
// Responsive typography and spacing
function Hero() {
return (
<section
className="
px-4 py-12 /* mobile spacing */
md:px-8 md:py-20 /* tablet spacing */
lg:px-16 lg:py-32 /* desktop spacing */
"
>
<h1
className="
text-3xl /* mobile: 30px */
md:text-5xl /* tablet: 48px */
lg:text-6xl /* desktop: 60px */
font-bold leading-tight
"
>
Ship faster with confidence
</h1>
</section>
);
}
Tailwind breakpoints (default):
| Prefix | Min-width | Typical target |
|---|---|---|
sm: | 640px | Large phones (landscape) |
md: | 768px | Tablets |
lg: | 1024px | Small laptops |
xl: | 1280px | Desktops |
2xl: | 1536px | Large desktops |
Container queries (Tailwind v3.3+):
// The component adapts to its container width, not the viewport
function Sidebar({ children }: { children: React.ReactNode }) {
return (
<div className="@container">
<div
className="
flex flex-col gap-2
@md:flex-row @md:gap-4 /* when container is 448px+ */
@lg:gap-6 /* when container is 512px+ */
"
>
{children}
</div>
</div>
);
}
Fluid typography (clamp-based):
// tailwind.config.ts
extend: {
fontSize: {
fluid: ['clamp(1rem, 0.5rem + 1.5vw, 1.5rem)', { lineHeight: '1.5' }],
'fluid-lg': ['clamp(1.5rem, 1rem + 2vw, 3rem)', { lineHeight: '1.2' }],
},
},
Max-width queries (Tailwind v3.2+):
// Target ONLY mobile
<div className="max-md:text-center max-md:px-4">
Only centered with extra padding on screens below 768px
</div>
Common mistakes:
hidden without a breakpoint visibility pair (content is lost)w-96 on mobile)https://tailwindcss.com/docs/responsive-design