Modern React component patterns for building scalable, maintainable UI libraries.
Works with
Covers five core patterns: props API design with TypeScript, composition, render props, custom hooks for logic separation, and performance optimization with React.memo and useMemo
Includes compound components, polymorphic components, and context-based state sharing for flexible, reusable architectures
Enforces single responsibility, accessibility standards (aria-*, role, tabindex), and prohibits prop dr
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionui-component-patternsExecute the skills CLI command in your project's root directory to begin installation:
Fetches ui-component-patterns from supercent-io/skills-template 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 ui-component-patterns. Access via /ui-component-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
1
total installs
1
this week
88
GitHub stars
0
upvotes
Run in your terminal
1
installs
1
this week
88
stars
Design Props that are easy to use and extensible.
Principles:
Example (Button):
interface ButtonProps {
// Required
children: React.ReactNode;
// Optional (with defaults)
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
size?: 'sm' | 'md' | 'lg';
disabled?: boolean;
isLoading?: boolean;
// Event handlers
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
// HTML attribute inheritance
type?: 'button' | 'submit' | 'reset';
className?: string;
}
function Button({
children,
variant = 'primary',
size = 'md',
disabled = false,
isLoading = false,
onClick,
type = 'button',
className = '',
...rest
}: ButtonProps) {
const baseClasses = 'btn';
const variantClasses = `btn-${variant}`;
const sizeClasses = `btn-${size}`;
const classes = `${baseClasses} ${variantClasses} ${sizeClasses} ${className}`;
return (
<button
type={type}
className={classes}
disabled={disabled || isLoading}
onClick={onClick}
{...rest}
>
{isLoading ? <Spinner /> : children}
</button>
);
}
// Usage example
<Button variant="primary" size="lg" onClick={() => alert('Clicked!')}>
Click Me
</Button>
Combine small components to build complex UI.
Example (Card):
// Card component (Container)
interface CardProps {
children: React.ReactNode;
className?: string;
}
function Card({ children, className = '' }: CardProps) {
return <div className={`card ${className}`}>{children}</div>;
}
// Card.Header
function CardHeader({ children }: { children: React.ReactNode }) {
return <div className="card-header">{children}</div>;
}
// Card.Body
function CardBody({ children }: { children: React.ReactNode }) {
return <div className="card-body">{children}</div>;
}
// Card.Footer
function CardFooter({ children }: { children: React.ReactNode }) {
return <div className="card-footer">{children}</div>;
}
// Compound Component pattern
Card.Header = CardHeader;
Card.Body = CardBody;
Card.Footer = CardFooter;
export default Card;
// Usage
import Card from './Card';
function ProductCard() {
return (
<Card>
<Card.Header>
<h3>Product Name</h3>
</Card.HeaderPrerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ 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.
supercent-io/skills-template
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
sickn33/antigravity-awesome-skills
leonxlnx/taste-skill
Registry listing for ui-component-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
ui-component-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.
I recommend ui-component-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in ui-component-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for ui-component-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in ui-component-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
ui-component-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.
Registry listing for ui-component-patterns matched our evaluation — installs cleanly and behaves as described in the markdown.
ui-component-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend ui-component-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 56