eleva

UI Patterns

Version: 1.2.0 Reusable code patterns for common UI scenarios.

Available Patterns

Pattern Description Link
Best Practices Selectors, components, lifecycle, performance View →
Forms Input binding, validation, submission View →
Async Data API fetching, loading states, pagination View →
Conditional Rendering Show/hide, tabs, modals, skeletons View →
Lists Search, filter, sort, drag-and-drop, CRUD View →
State Management Computed values, undo/redo, wizards View →
Local Storage Persistence, session storage, caching View →

Best Practices

Forms

Async Data

Conditional Rendering

Lists

State Management

Local Storage


Pattern Relationships

Understanding how patterns work together helps you build complete features:

Foundation Layer

Best Practices provides the foundation for all patterns. Start here for selector performance, lifecycle management, and optimization techniques.

Core Patterns

| Pattern | Builds On | Enables | |———|———–|———| | State Management | Best Practices | Forms, Lists, Async Data | | Conditional Rendering | State Management | Loading states, Tabs, Modals |

Domain Patterns

| Pattern | Uses | Common Combinations | |———|——|———————| | Forms | State, Conditional Rendering | + Storage (drafts), + Async (submit) | | Lists | State, Conditional Rendering | + Async (data), + Forms (inline edit) | | Async Data | State, Conditional Rendering | + Lists (display), + Storage (cache) | | Storage | State | + Forms (persist), + Async (cache) |

Common Pattern Combinations

Search Feature: Forms (input) → Async Data (fetch) → Lists (display) → Conditional Rendering (loading/empty states)

CRUD Operations: Forms (create/edit) → Async Data (API calls) → Lists (display) → Storage (offline cache)

Dashboard: Async Data (fetch metrics) → State (aggregate) → Conditional Rendering (loading) → Lists (data tables)


← Back to Examples Next: Best Practices →