Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jwynia avatar

Shadcn Layouts

  • 442 installs
  • 133 repo stars
  • Updated February 24, 2026
  • jwynia/agent-skills

shadcn-layouts is an agent skill that scaffolds responsive shadcn/ui app shells for developers who need dashboard, sidebar, header, and marketing page layouts without hand-rolling Tailwind grid and height chains.

About

shadcn-layouts is version 1.0 MIT utility skill in jwynia/agent-skills that generates correct shadcn and Tailwind layouts by applying CSS mental models agents usually miss. It targets React and Next.js projects using shadcn/ui with Tailwind CSS v3 or v4, focusing on viewport-filling app shells, dashboard sidebars, marketing pages, flex column scroll regions, and grid collapse fixes rather than syntax errors alone. The skill inspects height constraint chains, recommends utilities such as h-full, h-screen, min-h-0, min-w-0, shrink-0, and grid classes at the correct parent levels, and checks missing component dependencies or Tailwind configuration issues. Trigger phrases include create a shadcn layout, fix layout issues, debug CSS height problems, make scrolling work, and Tailwind flex or grid failures. Developers reach for shadcn-layouts when generated UI collapses, nested scroll areas fail, or h-full elements shrink inside flex columns despite otherwise valid shadcn components. Install via npx playbooks add skill jwynia/agent-skills --skill shadcn-layouts or equivalent skills CLI flows.

  • shadcn/ui layout recipes
  • dashboard and sidebar shells
  • responsive grid patterns
  • reusable section scaffolding
  • faster consistent UI structure

Shadcn Layouts by the numbers

  • 442 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #644 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jwynia/agent-skills --skill shadcn-layouts

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs442
repo stars133
Last updatedFebruary 24, 2026
Repositoryjwynia/agent-skills

How do you fix shadcn Tailwind layout height bugs?

Scaffold responsive app shells, dashboards, and marketing pages with shadcn/ui layout primitives instead of hand-rolling grid, sidebar, and header patterns from scratch.

Who is it for?

React and Next.js developers using shadcn/ui who need agents to fix flex height chains and scaffold dashboard or marketing layouts.

Skip if: Teams not using shadcn/ui or Tailwind for layout should skip shadcn-layouts.

When should I use this skill?

User asks to create shadcn layouts, fix collapsed h-full elements, debug scroll overflow, or repair Tailwind flex/grid dashboard shells.

What you get

Responsive shadcn layout components, corrected Tailwind utility chains, and scrollable app-shell or dashboard page structures.

  • Responsive shadcn layout scaffolding
  • Corrected Tailwind utility classes
  • Scrollable dashboard or marketing shells

By the numbers

  • Published as version 1.0 MIT skill in jwynia/agent-skills metadata
  • Targets Tailwind CSS v3/v4 with shadcn/ui on React and Next.js

Files

SKILL.mdMarkdownGitHub ↗

shadcn/Tailwind Layouts

Help generate shadcn/Tailwind components that render correctly the first time. Most agent-generated UI fails due to missing mental models about how CSS layout works—not syntax errors, but assumption gaps.

When to Use This Skill

Use this skill when:

  • Creating shadcn/Tailwind layouts
  • Debugging height/scroll issues
  • Fixing flex/grid problems
  • Setting up full-page app shells

Do NOT use this skill when:

  • Writing backend code
  • Working on non-Tailwind CSS projects
  • Designing (use frontend-design first)

Core Principle

CSS layout flows from constraints. Height flows down from explicit ancestors. Width flows up from content. Agents fail because they apply classes without understanding the constraint chain.

Critical Mental Models

Model 1: Height Inheritance Chain

h-full means height: 100%. 100% of what? 100% of the parent's computed height.

BROKEN (chain incomplete):
<html>                        <!-- no height -->
  <body>                      <!-- no height -->
    <div class="h-full">      <!-- 100% of nothing = 0 -->

WORKING (chain complete):
<html class="h-full">         <!-- 100% of viewport -->
  <body class="h-full">       <!-- 100% of html -->
    <div class="h-full">      <!-- 100% of body = works -->

Rule: Trace from element up to <html>. Every ancestor needs explicit height, OR use viewport units (h-screen) to break the chain.

Model 2: Flex Overflow Gotcha

Flex children have implicit min-height: auto, preventing shrinking below content size.

// BROKEN (won't scroll)
<div className="flex flex-col h-screen">
  <main className="flex-1 overflow-y-auto">  {/* Can't shrink! */}

// WORKING (scrolls correctly)
<div className="flex flex-col h-screen">
  <main className="flex-1 overflow-y-auto min-h-0">  {/* Can shrink */}

Rule: Flex children that scroll need min-h-0. Children that shouldn't shrink need shrink-0.

Model 3: Grid Parent/Child Separation

Grid is defined on the parent. Children just occupy cells.

// BROKEN
<div className="grid-cols-3">           {/* Missing 'grid'! */}

// WORKING
<div className="grid grid-cols-3">      {/* 'grid' enables grid-cols-* */}

Rule: flex or grid must be declared on parent before direction/template classes work.

Model 4: Scroll Container Dimensions

Scroll containers need explicit dimensions to know when to scroll.

// BROKEN (never scrolls)
<ScrollArea>  {/* No height constraint */}

// WORKING (flex-constrained)
<div className="flex flex-col h-screen">
  <ScrollArea className="flex-1 min-h-0">

Diagnostic States

SL1: Height Chain Broken

Symptoms: Elements collapse, h-full not working Fix: Trace to html, add heights or use h-screen

SL2: Flex Overflow Blocked

Symptoms: Scroll doesn't work, content overflows Fix: Add min-h-0 to flex children that scroll

SL3: Grid Structure Wrong

Symptoms: Items stack vertically instead of columns Fix: Ensure grid grid-cols-* on parent

SL4: Styles Not Applying

Symptoms: Unstyled components, colors wrong Fix: Check Tailwind content paths, CSS variables in globals.css

SL5: Component Dependencies Missing

Symptoms: "Module not found", functionality broken Fix: npx shadcn add [component], install peer deps

Common Layout Patterns

Full-Page App Shell

// layout.tsx
<html lang="en" className="h-full">
  <body className="h-full">{children}</body>
</html>

// page.tsx
<div className="flex h-full">
  <aside className="w-64 shrink-0 border-r overflow-y-auto">
    <nav>...</nav>
  </aside>
  <main className="flex-1 min-w-0 overflow-y-auto">
    {children}
  </main>
</div>

Dashboard with Header

<div className="flex flex-col h-screen">
  <header className="h-16 shrink-0 border-b">...</header>
  <div className="flex flex-1 min-h-0">
    <aside className="w-64 shrink-0 border-r overflow-y-auto">...</aside>
    <main className="flex-1 min-w-0 overflow-y-auto p-6">
      {children}
    </main>
  </div>
</div>

Card Grid

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
  {items.map(item => (
    <Card key={item.id}>
      <CardHeader><CardTitle>{item.title}</CardTitle></CardHeader>
      <CardContent>{item.content}</CardContent>
    </Card>
  ))}
</div>

Anti-Patterns

The Height Assumption

Using h-full without verifying ancestor chain. Fix: Trace to html. Use h-screen to break chain.

The Overflow Ignorance

Adding overflow-y-auto without min-h-0 on flex children. Fix: Flex children need min-h-0 to shrink.

The Import Guess

Guessing import paths like shadcn/ui. Fix: Check components.json for alias. Usually @/components/ui/*.

The Flat Compound

Flattening compound components (Dialog without DialogTrigger/DialogContent). Fix: Maintain required nesting structure.

Pre-Generation Checklist

  • [ ] Import alias known (@/components/ui/*)
  • [ ] html has h-full
  • [ ] body has h-full or min-h-full
  • [ ] Scroll containers have explicit height
  • [ ] Flex scroll children have min-h-0
  • [ ] Fixed elements have shrink-0

Related Skills

  • frontend-design - Design decisions before implementation
  • react-pwa - PWA features for React apps

Related skills

How it compares

Pick shadcn-layouts over generic frontend-design skills when the bug is Tailwind height chains in shadcn dashboard shells, not branding or color systems.

FAQ

What layout problems does shadcn-layouts solve?

shadcn-layouts solves collapsed h-full elements, broken nested scrolling, flex and grid overflow issues, and missing parent height constraints when agents generate shadcn/ui and Tailwind dashboard or marketing layouts.

Which stacks does shadcn-layouts support?

shadcn-layouts supports shadcn/ui with Tailwind CSS v3 or v4 on React and Next.js projects, applying CSS mental models to layout primitives instead of only component syntax.

When should agents load shadcn-layouts?

Agents should load shadcn-layouts when users request shadcn layout scaffolding, height or scroll debugging, full-page app shells, or fixes for Tailwind flex and grid failures in dashboard UIs.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.