# Component Design Systems

> Component Design Systems is an Agent Skill for design published in the cosmicstack-labs/mercury-agent-skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Building and maintaining scalable component libraries, design tokens, accessibility, and cross-team collaboration patterns

- Skill name: `component-design-systems`
- Category: [Design](https://www.openparable.com/skill/design/1)
- Source: https://github.com/cosmicstack-labs/mercury-agent-skills/blob/HEAD/categories/frontend/component-design-systems/SKILL.md
- Repository: cosmicstack-labs/mercury-agent-skills (360 GitHub stars when collected)

## SKILL.md

# Component Design Systems

Patterns for building scalable, accessible, and maintainable component libraries.

## Architecture

```
design-system/
├── tokens/              # Design tokens
│   ├── colors.json
│   ├── typography.json
│   └── spacing.json
├── primitives/          # Base components
│   ├── Button/
│   ├── Input/
│   └── Text/
├── patterns/            # Composed patterns
│   ├── FormField/
│   ├── DataTable/
│   └── Modal/
└── docs/               # Documentation
    └── Storybook/
```

## Component API Design

```tsx
// Compound component pattern
<Select>
  <Select.Label>Country</Select.Label>
  <Select.Trigger>
    <Select.Value placeholder="Select a country" />
  </Select.Trigger>
  <Select.Content>
    <Select.Item value="us">United States</Select.Item>
    <Select.Item value="uk">United Kingdom</Select.Item>
  </Select.Content>
</Select>
```

---

## Common Mistakes

1. **No design tokens**: Hardcoded values everywhere. Use tokens for colors, spacing, typography.
2. **Missing accessibility**: Always include ARIA labels, keyboard nav, focus management.
3. **Too opinionated**: Components should work out-of-box but be customizable via props/composition.
4. **No versioning strategy**: Use semver. Document breaking changes clearly.
5. **No visual regression tests**: Use Chromatic/Percy to catch unintended style changes.

---

Source: https://www.openparable.com/skill/design/component-design-systems (OpenParable). Cite the canonical URL above.
