When to use: Building admin panels, data management screens, list views, or any interface where users Create, Read, Update, and Delete records.
The test: Can users perform every CRUD operation without confusion about what will happen next?
CRUD Quick Reference
| Operation | User Question | Design Answer |
|---|
| Create | "How do I add one?" | Obvious + button or CTA near the list |
| Read | "Where is it?" | Scannable list with search and filter |
| Update | "How do I change it?" | Inline edit, modal, or dedicated page |
| Delete | "What if I make a mistake?" | Confirmation dialog + undo option |
Create Patterns
Checklist
Container Decision
| Condition | Use |
|---|
| 1-5 simple fields, context matters | Modal |
| 6+ fields or complex validation | Dedicated page |
| Quick-add from list view | Inline row or modal |
| Sub-items or relationships needed | Dedicated page |
Read Patterns
Checklist
Data Volume Rules
| Volume | Pattern | Pagination |
|---|
| Under 20 items | Show all | None needed |
| 20-100 items | Paginated | Page numbers, 10-25 per page |
| Over 100 items | Search required | Infinite scroll or paginated with search |
| Over 1000 items | Server-side search and filter | Load on demand only |
| Check | Threshold | How to Measure |
|---|
| Columns per table | 7 or fewer visible at once | Count columns |
| Row height | 40-56px for data tables | DevTools: measure row height |
| Cell content | Truncate at 50 characters, tooltip for full value | Check longest cell in each column |
| Actions per row | 3 or fewer (use overflow menu for more) | Count action buttons |
Update Patterns
Inline Edit
Best for: single field changes, status toggles.
Modal Edit
Best for: 2-5 fields, maintaining list context.
Page Edit
Best for: complex forms, URL-addressable records, mobile.
Decision Matrix
| Scenario | Best Pattern |
|---|
| Single field toggle | Inline |
| 1-3 simple fields | Inline or Modal |
| 4-6 fields | Modal |
| 7+ fields | Page |
| Needs a URL | Page |
| User needs list context | Modal |
| Primary use is mobile | Page |
| Sub-items or file uploads | Page |
Delete Patterns
Checklist
Confirmation Dialog Template
Title: Delete [Item Name]?
Body: This will permanently remove [Item Name]
and all associated [related data].
This action cannot be undone.
[Cancel] [Delete]
↑ red, right-aligned
Soft Delete Pattern
- Mark as deleted in database (don't remove)
- Show "Deleted" toast with Undo button (10-second window)
- Hide from UI after timeout
- Actually purge after 30 days (background job)
Bulk Operations
Container Decisions
When to use page vs modal vs drawer.
Decision Tree
Does it need a URL?
├── Yes --> PAGE
└── No
└── Is it a quick confirmation?
├── Yes --> MODAL (alert dialog)
└── No
└── Is it a multi-step process?
├── Yes --> PAGE (wizard)
└── No
└── Can content exceed viewport height?
├── Yes --> PAGE or DRAWER
└── No
└── Does user need list context?
├── Yes --> MODAL or DRAWER
└── No --> PAGE
Modal Rules
| Check | Threshold | How to Verify |
|---|
| Content fits viewport | No scrolling inside modal | Check at 768px viewport height |
| Maximum actions | 2 primary actions | Count buttons |
| Focus trapped | Tab stays within modal | Tab test |
| Escape closes | Pressing Escape dismisses | Keyboard test |
| Focus returns | Focus moves back to trigger on close | Close modal, check focus |
| Background locked | Cannot interact with background content | Click outside modal content area |
Modal Anti-Patterns
| Don't | Why | Instead |
|---|
| Modal opens modal | Confusing depth | Use page or multi-step wizard |
| Scrolling modal content | Users lose position | Use page |
| Complex forms in modal | Risk of data loss | Use page with save |
| Navigation inside modal | Breaks mental model | Use page |
| Modal for mobile primary flow | Poor mobile UX | Use full page |
Drawer Use Cases
State Management
Loading States
Error States
Empty States
Keyboard Shortcuts
For power users in data-heavy interfaces:
| Action | Shortcut |
|---|
| Create new | N |
| Edit selected | E |
| Delete selected | Delete or Backspace |
| Select all | Cmd/Ctrl + A |
| Search/filter | / or Cmd/Ctrl + F |
| Save | Cmd/Ctrl + S |
| Cancel/close | Escape |
Quick Diagnosis
| Symptom | Likely Cause | Fix |
|---|
| Users can't find "Add" | Button not visible or labeled differently | Top-right + button, clear label |
| Accidental deletes | No confirmation dialog | Add confirmation with item name |
| Lost work on edit | No unsaved changes warning | Warn on navigation, auto-save draft |
| Slow for power users | Mouse-only interface | Add keyboard shortcuts |
| Users confused by edit | Unclear where to click | Add explicit Edit button per row |
| Modal feels cramped | Too much content for modal | Move to page or drawer |
| Can't find items | No search or filter | Add search for 20+ items, filter for 50+ |
| Table unreadable on mobile | Too many columns | Responsive card layout or column priority |
Context
Questions
Which engineering decision related to this topic has the highest switching cost once made — and how do you make it well with incomplete information?
- At what scale or complexity level does the right answer to this topic change significantly?
- How does the introduction of AI-native workflows change the conventional wisdom about this technology?
- Which anti-pattern in this area is most commonly introduced by developers who know enough to be dangerous but not enough to know what they don't know?