development-react-components

Guide React component development with Coinbase Design System standards.

493|101|Updated Nov 8, 2024
One-click install
npx skills add https://github.com/coinbase/cds --skill development-react-components
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: development-react-components
Source: https://github.com/coinbase/cds/tree/main/.claude/skills/development-react-components
Command: npx skills add https://github.com/coinbase/cds --skill development-react-components

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and set of conventions for developing high-quality, reusable React components within the Coinbase Design System (CDS).

Core Features & Use Cases

  • Component Development Workflow: Outlines a step-by-step process from research to implementation and testing.
  • Organizational Standards: Defines clear file structures and component categorization.
  • Coding Conventions: Enforces best practices like memoization, ref handling, prop documentation, and design token usage.
  • Design Token System: Details the available design tokens for colors, spacing, typography, etc.
  • Component Patterns: Explains advanced patterns like Compound Components, Context + Hook, and Controlled/Uncontrolled patterns.
  • Use Case: A new developer joining the CDS team can use this Skill to quickly understand and adhere to all established guidelines for creating new React components.

Quick Start

Follow the established conventions for developing a new React component.

Frequently Asked Questions about development-react-components

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build React components that adhere to the Coinbase Design System standards?

To build React components adhering to Coinbase Design System standards, follow the defined component structure, naming conventions, prop types, and styling rules using design tokens for visual consistency.

What is the compound component pattern in React and when should I use it?

The compound component pattern in React is an advanced implementation approach connecting related subcomponents through context, allowing shared state management and ensuring structural maintainability.

How do I apply design tokens for styling React components in TypeScript?

Apply design tokens for styling React components by referencing the predefined system of colors, spacing, and typography, enforcing coding conventions to maintain visual consistency across the design system.

What are the best practices for React component file structure and organization?

Best practices for React component file structure involve following organizational standards that define clear file hierarchies and categorize components, ensuring a maintainable architecture from research to implementation.

Do I need to use memoization and ref handling when developing React components?

Yes, you need to use memoization and ref handling when developing React components, as these coding conventions are enforced to optimize rendering performance and manage DOM interactions properly.