building-components

Comprehensive guide for building modern, accessible, and composable UI components. Covers component taxonomy (primitives, components, blocks, templates), core design principles, and accessibility implementation including ARIA, keyboard navigation, and WCAG compliance Includes patterns for composable APIs, polymorphism, controlled/uncontrolled state, and the as-child pattern for flexible element composition Provides guidance on design tokens, theming systems, styling approaches, and using data attributes for state and styling Addresses publishing workflows: npm distribution, shadcn-style registries, component marketplaces, and documentation best practices

INSTALLATION
npx skills add https://github.com/vercel/components.build --skill building-components
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

Building Components

When to use this skill

Use when the user is:

  • Building new UI components (primitives, components, blocks, templates)
  • Implementing accessibility features (ARIA, keyboard navigation, focus management)
  • Creating composable component APIs (slots, render props, controlled/uncontrolled state)
  • Setting up design tokens and theming systems
  • Publishing components to npm or a registry
  • Writing component documentation
  • Implementing polymorphism or as-child patterns
  • Working with data attributes for styling/state

References

  • definitions.mdx - Artifact taxonomy (primitives, components, blocks, templates)
  • as-child.mdx - The as-child pattern for element polymorphism
  • types.mdx - TypeScript typing patterns for components
  • state.mdx - Controlled vs uncontrolled state management
  • npm.mdx - Publishing components to npm
  • docs.mdx - Writing component documentation
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card