A growing library of production-ready UX patterns
Know how your product feature should work.
Production-ready UX patterns for SaaS and AI products — flows, states, edge cases, mobile behaviour and implementation guidance.
43 patterns · React code for 8 · one-time payment
Example · from feature to patterns
Static previewFeature
I need users to approve multiple invoices.
Recommended patterns
- 1Bulk ActionsDataSelect many invoices and act on them in one step.
- 2Approval WorkflowWorkflowRoute each invoice to the right approver, with an audit trail.
- 3ConfirmationWorkflowState the exact count and amount before anything is approved.
- 4Partial FailureWorkflowReport “22 approved, 2 blocked” instead of a generic error.
- 5Activity HistoryDataRecord who approved what, and when.
Edge cases to plan for
Mixed eligibility
5 of 20 selected invoices are already paid.
Self-approval
The requester is in the approver group.
Concurrent decisions
Two approvers act within seconds of each other.
Behaviour, not screens
Most UI libraries show what software looks like. Statecraft explains how it should behave.
Design the states before engineering discovers them. Handle the edge cases before they become bugs.
Typical UI library
- Table
- Checkbox
- Button
- Modal
Statecraft
- Selection behaviour
- Bulk actions
- Permission rules
- Confirmation
- Processing
- Partial failure
- Undo
- Mobile behaviour
Featured patterns
The decisions behind a feature, not just its layout.
- DataFree
Bulk Actions
Let users perform one action across many records safely, with clear scope, eligibility and recovery.
9 states8 edge casesDesktop + Mobile
- DataFree
Advanced Filters
Help users narrow large datasets with filters they can see, edit, share and recover from.
8 states7 edge casesDesktop + Mobile
- FormsFree
Autosave
Save changes continuously without a Save button, while keeping users certain their work is safe.
8 states7 edge casesDesktop + Mobile
- Workflow Pro
Approval Workflow
Route a request through one or more reviewers with clear status, accountability and an auditable history.
9 states8 edge casesDesktop + Mobile
- AI Pro
AI Response
Present generated answers with streaming, sources, control and recovery, so users can trust and verify them.
9 states7 edge casesDesktop + Mobile
- FilesFree
File Upload
Let users add files with visible progress, early validation and recovery that never loses what already uploaded.
8 states7 edge casesDesktop + Mobile
Categories
Browse by product area.
How it works
From “how should this work?” to a shipped feature.
Without rediscovering the same edge cases in QA.
01
Find the feature
Search by what you’re building — “approve invoices”, “upload files”, “AI chat” — or browse by category. Every pattern opens with when to use it and, just as important, when not to.
- Search
- Categories
- Related patterns
02
Understand the behaviour
Read the opinionated recommendation and why it holds. Then work through the flow, every state and the edge cases that usually surface in QA — on desktop and on mobile.
- Flow
- States
- Edge cases
- Mobile rules
03
Build it
Hand the implementation prompt to Claude Code, Codex or Cursor in your existing codebase, or start from the React reference code. Check the result against the states and microcopy.
- Prompts
- Reference code
- Microcopy
Included in Pro
Start from working code.
React + TypeScript + Tailwind reference code for 8 patterns. Each one turns the pattern’s edge cases into tested logic you can drop into your codebase.
Logic
Plain TypeScript — selection, save queues, workflow rules. Works with any state library, even on the server.
React hook
A thin hook that connects the logic to your components.
Tailwind component
An accessible reference UI to restyle with your design system.
Tests
The edge cases from the pattern page, covered by tests you can run.
Delivered as a download. No account needed.
const { selection, update, notice } = useBulkSelection(filtersKey);
const results = await approveInvoices(toRequest(selection, query));
resultHeadline(summarizeResults(results), noun, "approved");
// → "18 invoices approved. 2 couldn’t be approved."Patterns with reference code
Stop rediscovering the same UX decisions.
Every pattern, every state, every edge case — the prompt to build it, and React code for 8 of them.