responsive-layout
Skill3 starsChanged 6 months agoMITView on GitHub
Use when building the app shell or any responsive screen — sidebar + topbar layouts, Tailwind breakpoints, container queries, and fluid grids that hold up from mobile to ultrawide.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- KyaniteLabs/tastechecktheir own version, first seen Sep 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- KyaniteLabs/tastecheck★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- accessible-componentsSkill
- auth-screensSkill
- billing-and-pricingSkill
- component-architectureSkill
- dashboard-layoutSkill
- data-tablesSkill
- design-tokens-themingSkill
- empty-and-loading-statesSkill
- forms-and-validationSkill
- modals-and-dialogsSkill
- navigation-patternsSkill
- notifications-and-toastsSkill
- onboarding-flowsSkill
- settings-pagesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Write the base style for mobile, then layer sm: md: lg: for larger screens:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Responsive Layout
Overview
Most SaaS apps share one shell: a collapsible sidebar, a sticky topbar, and a scrollable content area. Get the shell right with Flexbox/Grid and a mobile-first approach, and every page inside inherits good behavior. Reach for container queries when a component must adapt to its container, not the viewport.
When to use
- Building the application frame (sidebar + topbar + content).
- A layout breaks on mobile or wastes space on wide screens.
- A component needs to reflow based on available width, not screen size.
App shell pattern
export function AppShell({ children }: { children: React.ReactNode }) {
return (
<div className="flex min-h-screen bg-background text-foreground">
{/* Sidebar: hidden on mobile, fixed width on desktop */}
<aside className="hidden w-64 shrink-0 border-r md:block">
<Sidebar />
</aside>
<div className="flex min-w-0 flex-1 flex-col">
<header className="sticky top-0 z-30 flex h-14 items-center gap-3 border-b bg-background/95 px-4 backdrop-blur">
<MobileNavTrigger className="md:hidden" />
<Topbar />
</header>
<main className="flex-1 overflow-y-auto p-4 md:p-6">
<div className="mx-auto w-full max-w-6xl">{children}</div>
</main>
</div>
</div>
);
}min-w-0 on the flex child is the unsung hero — without it, long content (tables, code) forces horizontal overflow instead of wrapping.
Mobile-first breakpoints
Write the base style for mobile, then layer sm: md: lg: for larger screens:
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">Tailwind breakpoints: sm 640 · md 768 · lg 1024 · xl 1280 · 2xl 1536. On mobile the sidebar becomes a Sheet (see modals-and-dialogs).
Container queries (component-level responsiveness)
A card in a 3-column grid and the same card full-width should look different — based on its width:
<div className="@container">
<article className="flex flex-col gap-4 @md:flex-row @md:items-center">
<img className="aspect-video w-full rounded-lg @md:w-48" />
<div>…</div>
</article>
</div>Enable with the @tailwindcss/container-queries plugin. Prefer container queries for reusable components; viewport breakpoints for page structure.
Fluid sizing
clamp()for fluid type/space:text-[clamp(1.5rem,4vw,2.5rem)].min-h-screennoth-screenfor content that can grow.max-w-*+mx-autoto cap line length on wide screens (readability tops out ~75ch).
Pitfalls
- Forgetting
min-w-0on flex children → page-wide horizontal scrollbars. h-screenwith growing content clips overflow; usemin-h-screen.- Desktop-first (
lg:everywhere, overriding down) is harder than mobile-first. - No max width on huge monitors → 200-character lines nobody can read.
- Viewport queries for components that get reused at different widths.
Hand-off
A responsive shell that hosts navigation-patterns (the sidebar), dashboard-layout, and every product page.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

