Modern React UI patterns for loading states, error handling, and data fetching.
Works with
Covers five core principles: never show stale UI, always surface errors, use optimistic updates, progressive disclosure, and graceful degradation
Provides decision trees and component patterns for loading indicators, skeleton screens, error states, empty states, and button submission handling
Includes critical anti-patterns to avoid, such as showing spinners when cached data exists, silently swallowing er
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionreact-ui-patternsExecute the skills CLI command in your project's root directory to begin installation:
Fetches react-ui-patterns from sickn33/antigravity-awesome-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate react-ui-patterns. Access via /react-ui-patterns in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
31.1K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
31.1K
stars
Show loading indicator ONLY when there's no data to display.
// CORRECT - Only show loading when no data exists
const { data, loading, error } = useGetItemsQuery();
if (error) return <ErrorState error={error} onRetry={refetch} />;
if (loading && !data) return <LoadingState />;
if (!data?.items.length) return <EmptyState />;
return <ItemList items={data.items} />;
// WRONG - Shows spinner even when we have cached data
if (loading) return <LoadingState />; // Flashes on refetch!
Is there an error?
→ Yes: Show error state with retry option
→ No: Continue
Is it loading AND we have no data?
→ Yes: Show loading indicator (spinner/skeleton)
→ No: Continue
Do we have data?
→ Yes, with items: Show the data
→ Yes, but empty: Show empty state
→ No: Show loading (fallback)
| Use Skeleton When | Use Spinner When |
|---|---|
| Known content shape | Unknown content shape |
| List/card layouts | Modal actions |
| Initial page load | Button submissions |
| Content placeholders | Inline operations |
1. Inline error (field-level) → Form validation errors
2. Toast notification → Recoverable errors, user can retry
3. Error banner → Page-level errors, data still partially usable
4. Full error screen → Unrecoverable, needs user action
CRITICAL: Never swallow errors silently.
// CORRECT - Error always surfaced to user
const [createItem, { loading }] = useCreateItemMutation({
onCompleted: () => {
toast.success({ title: 'Item created' });
},
onError: (error) => {
console.error('createItem failed:', error);
toast.error({ title: 'Failed to create item' });
},
});
// WRONG - Error silently caught, user has no idea
const [createItem] = useCreateItemMutation({
onError: (error) => {
console.error(error); // User sees nothing!
},
});
interface ErrorStateProps {
error: Error;
onRetry?: () => void;
title?: string;
}
const ErrorState = ({ error, onRetry, title }: ErrorStateProps) => (
<div className="error-state">
<Icon name="exclamation-circle" />
<h3>{title ?? 'Something went wrong'}</h3>
<p>{error.message}</p>
{onRetry && (
<Button onClick={onRetry}>Try Again</Button>
)}
</div>
);
<Button
onClick={handleSubmit}
isLoading={isSubmitting}
disabled={!isValid || isSubmitting}
>
Submit
</Button>
CRITICAL: Always disable triggers during async operations.
// CORRECT - Button disabled while loading
<Button
disabled={isSubmitting}
isLoading={isSubmitting}
onClick={handleSubmit}
>
Submit
</Button>
// WRONG - User can tap multiple times
<Button onClick={handleSubmit}>
{isSubmitting ? 'Submitting...' : 'Submit'}
</Button>
Every list/collection MUST have an empty state:
// WRONG - No empty state
return <FlatList data={items} />;
// CORRECT - Explicit empty state
return (
<FlatList
data={items}
ListEmptyComponent={<EmptyState />}
/>
);
// Search with no results
<EmptyState
icon="search"
title="No results found"
description="Try different search terms"
/>
// List with no items yet
<EmptyState
icon="plus-circle"
title="No items yet"
description="Create your first item"
action=Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
antigravity-design-expert
209sickn33/antigravity-awesome-skills
Frontendsame reporeact-vite-best-practices
58asyrafhussin/agent-skills
Frontendtag: reactfrontend-design
662anthropics/claude-code
Frontendsame categoryui-animation
243mblode/agent-skills
Frontendsame categorypremium-frontend-ui
236github/awesome-copilot
Frontendsame categoryhigh-end-visual-design
193leonxlnx/taste-skill
Frontendsame categoryReviews
4.6★★★★★31 reviews- AAarav Chen★★★★★Dec 20, 2024
Registry listing for react-ui-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
- SShikha Mishra★★★★★Dec 16, 2024
Solid pick for teams standardizing on skills: react-ui-patterns is focused, and the summary matches what you get after install.
- PPratham Ware★★★★★Dec 4, 2024
react-ui-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- SSophia Okafor★★★★★Nov 27, 2024
react-ui-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.
- YYash Thakker★★★★★Nov 23, 2024
Registry listing for react-ui-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
- NNoor Huang★★★★★Nov 11, 2024
react-ui-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- FFatima Garcia★★★★★Oct 18, 2024
Solid pick for teams standardizing on skills: react-ui-patterns is focused, and the summary matches what you get after install.
- DDhruvi Jain★★★★★Oct 14, 2024
react-ui-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.
- NNoor Anderson★★★★★Oct 2, 2024
We added react-ui-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- SSophia Thompson★★★★★Sep 25, 2024
react-ui-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 31
1 / 4Discussion
Comments — not star reviews- No comments yet — start the thread.