responsive-layout-builder/SKILL.md
Build responsive layouts with CSS Grid, Flexbox, and container queries. Use when creating responsive designs, fixing layout issues, or building mobile-first layouts.
npx skillsauth add onewave-ai/claude-skills responsive-layout-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When building responsive layouts:
/* Tailwind defaults */
sm: 640px /* Small devices */
md: 768px /* Tablets */
lg: 1024px /* Laptops */
xl: 1280px /* Desktops */
2xl: 1536px /* Large screens */
/* Custom CSS */
@media (min-width: 640px) { }
@media (min-width: 768px) { }
@media (min-width: 1024px) { }
// Tailwind CSS
<div className="min-h-screen flex flex-col">
<header className="h-16 bg-white border-b">Header</header>
<div className="flex-1 flex">
<aside className="hidden md:block w-64 bg-gray-50 border-r">
Sidebar
</aside>
<main className="flex-1 p-6">
Main Content
</main>
</div>
<footer className="h-16 bg-white border-t">Footer</footer>
</div>
/* Plain CSS */
.layout {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
min-height: 100vh;
}
@media (min-width: 768px) {
.layout {
grid-template-columns: 250px 1fr;
}
.header, .footer {
grid-column: 1 / -1;
}
}
// Tailwind - Auto-fit cards
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
{items.map(item => (
<Card key={item.id} {...item} />
))}
</div>
// Auto-fill with minimum width
<div className="grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-6">
{items.map(item => (
<Card key={item.id} {...item} />
))}
</div>
/* Plain CSS */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 1.5rem;
}
// Fixed sidebar, scrollable content
<div className="flex h-screen">
<aside className="w-64 flex-shrink-0 overflow-y-auto border-r bg-gray-50">
<nav className="p-4">Sidebar Nav</nav>
</aside>
<main className="flex-1 overflow-y-auto">
<div className="p-6">Main Content</div>
</main>
</div>
// Collapsible sidebar
<div className="flex h-screen">
<aside className={cn(
"flex-shrink-0 overflow-y-auto border-r bg-gray-50 transition-all",
isOpen ? "w-64" : "w-16"
)}>
<nav className="p-4">...</nav>
</aside>
<main className="flex-1 overflow-y-auto p-6">...</main>
</div>
<section className="relative min-h-[60vh] flex items-center justify-center px-4">
{/* Background */}
<div className="absolute inset-0 bg-gradient-to-br from-blue-600 to-purple-700" />
{/* Content */}
<div className="relative z-10 max-w-4xl mx-auto text-center text-white">
<h1 className="text-4xl md:text-5xl lg:text-6xl font-bold">
Headline Here
</h1>
<p className="mt-6 text-lg md:text-xl opacity-90 max-w-2xl mx-auto">
Subheadline text goes here with more details.
</p>
<div className="mt-8 flex flex-col sm:flex-row gap-4 justify-center">
<button className="px-8 py-3 bg-white text-blue-600 rounded-lg font-semibold">
Primary CTA
</button>
<button className="px-8 py-3 border-2 border-white rounded-lg font-semibold">
Secondary CTA
</button>
</div>
</div>
</section>
// CSS Columns approach
<div className="columns-1 sm:columns-2 lg:columns-3 gap-6 space-y-6">
{items.map(item => (
<div key={item.id} className="break-inside-avoid">
<Card {...item} />
</div>
))}
</div>
<header className="sticky top-0 z-50 bg-white/80 backdrop-blur-md border-b">
<nav className="max-w-7xl mx-auto px-4 h-16 flex items-center justify-between">
<Logo />
<NavLinks className="hidden md:flex" />
<MobileMenuButton className="md:hidden" />
</nav>
</header>
/* Define container */
.card-container {
container-type: inline-size;
}
/* Query the container */
@container (min-width: 400px) {
.card {
display: flex;
flex-direction: row;
}
}
// Tailwind v3.2+
<div className="@container">
<div className="flex flex-col @md:flex-row">
<img className="w-full @md:w-48" />
<div className="p-4">Content</div>
</div>
</div>
| Use Flexbox | Use Grid | |-------------|----------| | Navigation bars | Page layouts | | Card content alignment | Card grids | | Centering content | Complex 2D layouts | | Space distribution | Overlapping elements | | Unknown item count | Defined structure |
// Fluid typography with clamp
<h1 className="text-[clamp(2rem,5vw,4rem)]">
Responsive Heading
</h1>
// Tailwind responsive
<h1 className="text-2xl sm:text-3xl md:text-4xl lg:text-5xl">
Responsive Heading
</h1>
development
Build a complete typographic system -- modular or fluid type scale, line-height and tracking per size, weight roles, and vertical rhythm -- exported as tokens, Tailwind config, and CSS. Pairs with font-pairing-suggester (which picks the fonts; this builds the system they live in).
development
Respond to Google, Yelp, and industry reviews in the owner's voice -- gracious on the 5-stars, masterful on the 1-stars. Handles the angry customer, the unfair review, the fake review, and the one that mentions a legal or health issue. Every response written for the thousand future customers reading it.
tools
--- name: motion-language-designer description: Define a product's motion design language -- duration and easing scales, choreography rules, and signature moves -- and export it as tokens plus ready-to-use Framer Motion variants and CSS. The difference between animations and a motion system: everything moves like it belongs to the same product. tools: Read, Glob, Grep, Write, Edit, Bash model: inherit --- # Motion Language Designer Design motion the way type and color get designed: as a system
development
Get a local business found on Google -- audit and optimize the Google Business Profile, local pack ranking factors, review velocity, NAP consistency across directories, and location pages. For businesses whose customers search "near me," this outranks everything else in marketing.