Home
cd ../playbooks
Developer ToolsIntermediate

Frontend UX Pattern Library

Concrete, research-backed patterns for SaaS dashboards, landing pages, and forms — plus accessibility requirements, Tailwind implementation gotchas, and a pre-delivery checklist that treats accessibility as a launch blocker, not a nice-to-have.

5 minutes
By majidmanzarpourSource
#frontend#ux-patterns#accessibility#tailwind#react#saas-dashboard#landing-page#conversion-optimization#wcag

Your form has 11 fields, asks for a phone number nobody needs, and validates on every keystroke — three separate, measured ways to tank conversion, and none of them show up as a bug because the page still technically works.

Who it's for: frontend developers who want concrete UX patterns instead of vague design advice, indie hackers building a SaaS dashboard or landing page without a designer, teams wanting an accessibility checklist that's actually specific enough to act on, React/Tailwind developers who keep hitting the same dynamic-class-name bug, anyone shipping a form who wants the conversion research instead of guessing

Example

"Build a settings page and a signup form for our dashboard" → Settings laid out as bucket + side panel with destructive actions grouped in a Danger Zone, signup form built as a single-column 4-field layout instead of 11 (a measured 120% conversion difference), every input properly labeled and validated on blur, and a pre-delivery checklist confirming touch targets, contrast, and focus states before calling it done

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

Or install from your terminal:
npx ccplaybooks add frontend-ux-pattern-library
# Frontend UX Pattern Library

## Your Role

You build production-grade frontend interfaces using concrete, research-backed patterns for SaaS dashboards, landing pages, forms, and components — not vague "make it look good" guidance. Every recommendation here has a specific reason: a conversion study, an accessibility requirement, or a documented technical failure mode.

This is a pattern library and a pre-delivery checklist, not an aesthetic-direction exercise — pair it with your own design-token/palette decisions for the visual layer.

---

## SaaS Dashboard Patterns

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

A pattern library for the parts of frontend UX that have a right answer, not just a style preference: SaaS dashboard layout architecture, landing page section flow, form field counts backed by actual conversion research, toast timing formulas, and a WCAG accessibility checklist specific enough to act on directly rather than "make it accessible."

Pairs well with a separate aesthetic-direction playbook for the visual/brand layer — this one covers structure, conversion, accessibility, and the specific Tailwind/React implementation traps that produce silent bugs.


Quick Start

Step 1: Create a Project Folder

mkdir frontend-patterns && cd frontend-patterns

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Build a Component or Page

claude

Then ask: "Build a settings page for our dashboard" or "Review this landing page against the pre-delivery checklist"


What's Covered

Area Includes
SaaS dashboards Layout architecture, navigation-by-scope rules, empty states, settings page conventions, toast timing formula
Landing pages Above-the-fold requirements, section flow, CTA design, pricing table rules, social proof placement
Forms Research-backed field-count and layout guidance
Accessibility Contrast ratios, touch target sizing, focus states, form labeling, semantic HTML
Tailwind/React The dynamic-class-name purge bug, cn() helper pattern, CVA variants, reduced-motion handling

Research-Backed Form Numbers

  • Single-column forms: 120% fewer errors than multi-column
  • 4 fields vs. 11 fields: 120% more conversions
  • Requiring a phone number unnecessarily: 58% abandonment

Tips & Best Practices

  • Never construct a Tailwind class name dynamically. `bg-${color}-500` gets purged at build time because Tailwind scans for literal class strings — the code compiles fine and renders unstyled in production. Use an explicit lookup object instead; this is one of the most common silent frontend bugs.
  • Validate forms on blur, not on every keystroke. Mid-keystroke validation flags incomplete input as an error before the user has finished typing, which reads as impatient and produces false negatives.
  • Toast duration has an accessibility floor, not just a default. 4-5 seconds is the norm, but 6 seconds is the accessibility minimum — shorter and screen reader users can't finish reading before it auto-dismisses.
  • Destructive confirmations require typing the resource name or a specific label, never a generic "Yes" — this is a deliberate friction point, not an oversight to streamline away.
  • The pre-delivery checklist is a gate, not a courtesy pass. Treat every accessibility item — contrast, touch targets, labels, focus states — as a launch blocker rather than a follow-up ticket.

Limitations

  • This is a structural and technical pattern library, not an aesthetic-direction guide — for palette, typography personality, and avoiding the "generic AI look," pair it with a design-direction playbook
  • The Tailwind/React implementation section assumes that specific stack — the dashboard, landing page, and accessibility guidance is stack-agnostic, but the code patterns are Tailwind/React-specific
  • Conversion statistics (form field counts, phone number abandonment) are general findings, not guarantees for every product — validate with your own funnel data where it matters

$Related Playbooks

Developer Tools

AI Crawler Access Audit: Who Can Actually Read Your Site

Maps 14 AI crawlers against your robots.txt, meta tags, and HTTP headers, then returns an access score and the exact rules to change

10 minutes
Intermediate
Developer Tools

Full-Output Enforcement: No Placeholders, No Stubs

A short rule set that bans TODO comments, skeleton code, and 'rest follows the same pattern' shortcuts so Claude always delivers complete, runnable output

2 minutes
Beginner
Developer Tools

Ginkgo Table and Dynamic Specs

Parameterize and generate Ginkgo test specs correctly — DescribeTable/Entry, the four ways to name an entry, DescribeTableSubtree for multi-It rows, reusable entry sets, and the one gotcha (Entry params evaluate at construction time, not BeforeEach time) that causes most table-spec bugs.

5 minutes
Intermediate
Developer Tools

Ginkgo Timeouts and Async Testing

Make Ginkgo specs interruptible and test asynchronous behavior correctly — SpecContext cancellation, NodeTimeout/SpecTimeout/GracePeriod, Eventually/Consistently with proper context propagation, and the two goroutine rules (GinkgoRecover, poll-don't-block) that prevent one failed assertion from crashing an entire Go test suite.

5 minutes
Intermediate
Developer Tools

Writing Ginkgo Specs

Author correct Ginkgo specs — container vs. subject vs. setup nodes, the declare-in-container/initialize-in-setup rule that prevents the most common Ginkgo bug, JustBeforeEach for separating creation from configuration, DeferCleanup for restore-not-clear teardown, and GinkgoHelper() for failure locations that point at the caller instead of the helper.

5 minutes
Beginner
Developer Tools

Git Conflict Resolution Framework

A plan-first framework for resolving Git merge conflicts by combining both branches' intent instead of blindly picking a side — categorized resolution patterns for imports, tests, generated files, configs, code logic, and struct definitions, with a mandatory approval step before any file is touched.

5 minutes
Intermediate
Developer Tools

Git Commit & PR Automation

Three streamlined git workflows: commit with an auto-drafted message matching your repo's style, ship a full commit-push-PR in one step, and clean up branches deleted on the remote.

5 minutes
Beginner
Developer Tools

Hookify Guardrails

Create custom Claude Code guardrails with lightweight markdown rule files instead of hand-editing hooks.json — pattern matching, no restart required, rules live-load on the next tool call.

5 minutes
Beginner
Developer Tools

llms.txt Generator & Auditor

Generate and validate llms.txt, the root-level Markdown file that tells AI systems what your site is and which pages to cite

10 minutes
Intermediate
Developer Tools

GEO Schema: Structured Data for AI Citation

Audit and generate schema.org JSON-LD built for AI comprehension, with a sameAs entity graph, knowsAbout topics, and a 0-100 scoring rubric

10 minutes
Intermediate
Developer Tools

GEO Technical SEO Audit: 8 Categories, 100 Points

A scored technical audit covering crawlability, indexability, security, Core Web Vitals, and the server-side rendering check that decides whether AI crawlers see your content at all

15 minutes
Advanced
Developer Tools

GEO Toolkit Updater

Pull the latest geo-seo-claude skills, agents, scripts, and schema templates from upstream, with a diff summary before anything is overwritten

5 minutes
Beginner

Browse all Developer Tools playbooks →