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

Ui Patterns

  • 3 installs
  • 230 repo stars
  • Updated July 27, 2026
  • whawkinsiv/solo-founder-superpowers

Helps with ai & agent building tasks.

About

ui-patterns is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • ui-patterns
  • AI & Agent Building
  • AI-coding skill

Ui Patterns by the numbers

  • 3 all-time installs (skills.sh)
  • Ranked #13,674 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/whawkinsiv/solo-founder-superpowers --skill ui-patterns

Add your badge

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

Listed on Skillselion
Installs3
repo stars230
Last updatedJuly 27, 2026
Repositorywhawkinsiv/solo-founder-superpowers

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

UI Patterns

This skill covers how to build pages and compose components for SaaS applications. It provides the structural decisions — which components to use, how to lay out pages, and how to handle every UI state. For visual styling (colors, typography, spacing systems), see the beautify skill. For user flow design, see ux-design. For accessibility requirements (semantic HTML, keyboard nav, ARIA), see ux-design/ACCESSIBILITY.md.

Component Library Selection

Default: shadcn/ui + Tailwind CSS. This is the correct choice for 90% of founder-built SaaS apps. shadcn/ui provides copy-paste components built on Radix primitives — you own the code, can customize freely, and avoid dependency lock-in.

Decision framework:

SituationChoiceWhy
Public-facing SaaS productshadcn/ui + TailwindFull design control, great defaults, accessible
Internal admin tool / back-officeAnt Design or MUIDense data display, built-in table/form patterns, faster to ship
Need one specific primitive (tooltip, dialog)Radix directlySkip the styling layer, use just the behavior
Existing MUI/Chakra codebaseStay with current libMigration cost rarely worth it mid-project
React Native / mobile appReact Native Paper or TamaguiWeb component libs don't apply

When using shadcn/ui: install components individually (npx shadcn-ui@latest add button), don't install everything upfront. Configure the components.json path aliases to match the project structure.

Page Composition Principles

Every SaaS page follows a predictable anatomy. Structure pages using these content zones:

Page header — Title, description, primary action button (top-right). Breadcrumbs above the title if nested. Height: 64-80px.

Primary content — The main purpose of the page. Takes 60-70% of width on desktop. This is the "spine" — the vertical column the user's eye follows.

Secondary content — Supporting information, filters, related items. Sidebar or below primary content. Takes 30-40% width or full-width below on mobile.

Actions area — Sticky bottom bar for forms, floating action button, or inline with content. Never hide primary actions in menus.

The page spine principle: every page has one dominant vertical column. On a dashboard, it's the metrics-to-activity flow. On a settings page, it's the form sections. On a list page, it's the table. Identify the spine and give it visual priority — other content supports it.

Standard page container: max-w-7xl mx-auto px-4 sm:px-6 lg:px-8. For content-heavy pages (docs, settings forms): max-w-3xl. For full-bleed layouts (dashboards): no max-width, use the sidebar to constrain.

The State Matrix

Every data-driven component must handle five states. Missing any one of these creates a broken experience. When building any component that displays dynamic data, implement all five:

Loading State

Use skeleton loaders that match the shape of the real content. Never use spinners for inline content — spinners are only for full-page loads or button actions.

  • Tables: render 5-8 skeleton rows with column-width-matched blocks
  • Cards: render the card shell with pulsing placeholder blocks
  • Lists: render 3-5 skeleton items
  • Use animate-pulse with bg-muted blocks. Match heights and widths to actual content.

Empty State

The most neglected state. Every empty state needs: an icon or illustration, a headline explaining what will appear here, a description of how to populate it, and a primary CTA button.

No projects yet → "Create your first project" button
No search results → "Try different keywords" suggestion
No notifications → "You're all caught up" message (no CTA needed)

Empty states are onboarding moments. Use them to teach users what to do next.

Error State

Display what went wrong in plain language and provide a retry action. Never show raw error codes or stack traces.

  • Inline errors: red text below the failed component + retry button
  • Full-page errors: centered message with retry and "go back" options
  • Network errors: "Connection lost. Retrying..." with auto-retry logic
  • Always preserve user input on form errors — never clear fields

Success State

The normal content display. This is what most developers build first (and sometimes only). Ensure it handles variable content lengths — long titles, missing optional fields, various image aspect ratios.

Overflow State

What happens when there's too much data:

  • Tables: paginate at 10-25 rows, show total count, provide page size selector
  • Lists: infinite scroll or "Load more" button. Show count: "Showing 20 of 148"
  • Text: truncate with ellipsis and "Show more" expand option. Use line-clamp-2 or line-clamp-3
  • Tags/badges: show first 3 + "+N more" pill

Responsive Strategy

Use mobile-first with Tailwind's breakpoint system. Default styles target mobile, then layer on complexity:

BreakpointWidthTarget
default0-639pxMobile phones
sm640px+Large phones, small tablets
md768px+Tablets
lg1024px+Small laptops, landscape tablets
xl1280px+Desktops
2xl1536px+Large monitors

What changes at each breakpoint:

  • Mobile (default): Single column. Bottom navigation. Cards stack vertically. Tables become card lists. Sidebar hidden behind hamburger. Modals go full-screen. Horizontal padding: 16px.
  • sm: Minor adjustments. Two-column grids where appropriate. Slightly more padding.
  • md: Sidebar can appear as collapsible overlay. Tables can show with horizontal scroll. Two or three column grids. Padding: 24px.
  • lg: Full sidebar visible. Tables display normally. Multi-column layouts activate. Dashboard grids expand. Padding: 32px.
  • xl+: Max-width containers center content. Extra whitespace on sides. Optional: wider sidebar, more columns.

Key responsive patterns:

Desktop PatternMobile Adaptation
Sidebar navigationBottom tab bar (5 items max) or hamburger menu
Data tableStacked cards with key fields visible
Multi-column gridSingle column, stacked
Side-by-side panelsTabbed or stacked sections
Hover tooltipsTap-to-reveal or always-visible labels
Right-click context menuLong-press menu or action row with icons
Modal dialogFull-screen sheet sliding up from bottom

For the sidebar-to-bottom-nav pattern: don't just hide the sidebar. Build a dedicated BottomNav component with 4-5 icon+label items. The items should map to the top-level sidebar sections, not be a 1:1 copy.

Dark Mode

When to implement: If building an MVP for validation, skip dark mode. If building a product users will spend hours in (dashboards, dev tools, writing apps), implement from day 1. Adding dark mode later requires touching every component — it's significantly cheaper to build it in from the start.

Implementation approach:

1. Define all colors as CSS custom properties in :root and .dark 2. Use Tailwind's dark: prefix for overrides 3. If using shadcn/ui, this is already set up — just configure the theme in globals.css 4. Toggle with a class on <html> element: document.documentElement.classList.toggle('dark') 5. Respect system preference with prefers-color-scheme media query, but let users override 6. Persist preference in localStorage

What changes beyond swapping background/text colors:

  • Shadows: reduce opacity significantly or remove entirely. Dark surfaces don't cast visible shadows — use subtle borders or lighter surface colors to create elevation instead.
  • Borders: increase visibility. Use border-border (which maps to a lighter value in dark mode) rather than hardcoded colors.
  • Images and illustrations: reduce brightness slightly (brightness-90). Avoid pure-white images on dark backgrounds.
  • Status colors: adjust saturation down and lightness up. A red that works on white won't work on dark gray — it needs to be softer.
  • Hover states: use hover:bg-muted rather than hardcoded opacity changes. Light mode hovers darken, dark mode hovers lighten.
  • Focus rings: ensure visibility on dark backgrounds. Default blue rings work; custom colored rings may not.

Common Mistakes

MistakeWhat to do instead
Building a custom component library from scratchUse shadcn/ui. Customize after shipping.
Only implementing the success stateBuild all five states (loading, empty, error, success, overflow) for every data component
Using spinners everywhereSkeleton loaders for inline content, spinners only for page-level or button loading
Fixed layouts that don't respond to screen sizeMobile-first responsive with Tailwind breakpoints, test at 375px width
Hiding critical actions in dropdown menusPrimary actions get dedicated buttons, only secondary/tertiary go in menus
Pixel-perfect custom breakpointsUse Tailwind's standard breakpoints — they cover real devices
Dark mode as an afterthoughtDecide at project start: implement now or explicitly defer. Don't half-implement.
Tables on mobile with horizontal scroll onlyTransform tables into card layouts on mobile, showing key data points
Modals on top of modalsOne modal at a time. Use sheets/slide-outs for secondary actions from a modal.
Inconsistent spacing between sectionsPick a page section gap and stick with it: space-y-8 for page sections, space-y-4 within sections

Related skills

This week in AI coding

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

unsubscribe anytime.