Layout Patterns for AI Coders | SheCodes
Beginner 6 min read

Layout Patterns for AI Coders

Common page layouts you'll build with AI. Know the structure, know the sections, and describe them precisely.

In this chapter

  • The most common page layouts and what each is for
  • How to describe a layout precisely to your AI tool
  • When to use grids, columns, sidebars, and full-width sections
  • How to make a layout that adapts cleanly to phones
Nav
Hero
F1
F2
F3
Pricing
Footer
Landing Page The classic marketing page. Designed to convert visitors into users. Hero with CTA Features grid Social proof / testimonials Pricing table FAQ accordion CTA banner Footer
Sample Prompt

“Create a landing page with a hero section, 3-column features grid, testimonials carousel, pricing table with 3 tiers, FAQ accordion, and footer.”

Sidebar
Top Bar
Stat
Stat
Stat
Content
Dashboard Admin or app dashboard with sidebar navigation and data panels. Sidebar navigation Top bar with search & user Stats cards row Main content area Data table Charts
Sample Prompt

“Create a dashboard layout with a collapsible sidebar on the left, a top bar with search and user avatar, stat cards, a data table, and a chart section.”

Header
Article
Author Card
Blog / Article Content-focused layout optimized for reading. Header with title & meta Featured image Article body (prose) Table of contents sidebar Author card Related posts Comments
Sample Prompt

“Create a blog post layout with a centered article (max-w-3xl), table of contents sidebar on desktop, author bio card at bottom, and related posts grid.”

Nav
Filters
Item
Item
Item
Item
E-Commerce Product listing and shopping experience. Category nav bar Filter sidebar Product grid Product cards with image, price, rating Shopping cart drawer Checkout form
Sample Prompt

“Create an e-commerce product listing page with a filter sidebar on the left, product cards in a 3-column grid, each with image, name, price, and Add to Cart button.”

Hero
Project
Project
Project
Contact
Portfolio Showcase your work and skills. Hero with name & title About section Skills/tech stack Project gallery Testimonials Contact form
Sample Prompt

“Create a personal portfolio with a hero showing my name and title, an about section, skills badges, project cards with screenshots, and a contact form.”

Top Nav
Sidebar
Tab 1
Tab 2
Tab 3
Main Content
SaaS App Software application with authentication and user flows. Auth pages (login/signup) Onboarding wizard Main app layout Settings page Billing page Empty states
Sample Prompt

“Create a SaaS app layout with a top navbar, sidebar navigation, main content area, and a settings page with tabs for Profile, Billing, and Notifications.”

Top Nav
Sidebar
Content
TOC
Documentation Technical docs with searchable sidebar navigation. Search bar Sidebar with nested links Content area with headings On-page navigation Code blocks Previous/Next navigation
Sample Prompt

“Create a documentation site layout with a searchable sidebar on the left, main content with code blocks in the center, and on-page nav (table of contents) on the right.”

Top Nav
Nav
Feed
Trending
Social Feed Content feed with posts, likes, and comments. Navigation bar Post composer Feed of posts Right sidebar (trending, suggestions) User profiles Notification panel
Sample Prompt

“Create a social media feed layout with a navigation bar, a centered feed of post cards (max-w-2xl), and a right sidebar with trending topics and suggested users.”

Prompt This

Copy-paste these prompts into your AI tool to apply what you just learned.

CREATE A PAGE LAYOUT

“Create a responsive page layout with a [sidebar / header / grid] using CSS Grid or Flexbox. It should work on mobile, tablet, and desktop. On mobile, stack everything vertically. On desktop, show the full layout.”

BUILD A DASHBOARD LAYOUT

“Build a dashboard layout with a fixed sidebar on the left (240px wide), a top header bar (64px tall), and a scrollable main content area. The sidebar should collapse to icons on tablet and become a hamburger menu on mobile.”

BUILD A LANDING PAGE

“Create a landing page layout with these sections in order: navbar, hero with headline and CTA button, 3-column features grid, testimonials, pricing table with 3 tiers, FAQ accordion, and a footer. Make it fully responsive.”

Frequently Asked Questions

What layout should I use for my homepage?

The most common pattern is: full-width navbar, centered content with a max-width (usually 1200px), and a footer. Inside that, use a single column for text-heavy pages or a grid for cards and features. Start simple and add complexity only when needed.

When should I use Flexbox vs Grid?

Use Flexbox for one-dimensional layouts: things in a row or column (navbars, button groups, card rows). Use Grid for two-dimensional layouts: things in rows AND columns (dashboards, image galleries, pricing tables). Your AI tool will pick the right one if you describe what you want.

How do I make my layout look good on mobile?

Stack things vertically on small screens. A 3-column grid on desktop should become a single column on mobile. Use responsive breakpoints (sm, md, lg in Tailwind) to adjust. Tell your AI tool to 'make it responsive' and it will handle the breakpoints.