Building Components

by vercelba7274504373No license798 starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 7 weeks ago

Guide for building modern, accessible, and composable UI components. Use when building new components, implementing accessibility, creating composable APIs, setting up design tokens, publishing to npm/registry, or writing component documentation.

AI-generated overview

Guides building modern, accessible, composable UI components, from APIs and design tokens to npm or registry publishing.

What it does
This skill provides guidance for creating UI components such as primitives, components, blocks and templates. It covers accessibility (ARIA, keyboard navigation, focus management), composable APIs, controlled and uncontrolled state, polymorphism and as-child patterns, data attributes, styling and design tokens. It also addresses distributing components through npm or a shadcn-style registry and writing component documentation. It is instruction-only and points to reference documents for each topic.
When to use it
Use it when building new UI components or component libraries. It also fits implementing accessibility, designing composable component APIs, setting up design tokens and theming, or publishing and documenting components.
Requirements
No scripts or special tooling are required; it is an instruction-only skill with reference documents. It assumes a component development context, such as TypeScript and a package or registry publishing workflow.

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)
  • principles.mdx - Core principles for component design
  • accessibility.mdx - ARIA, keyboard navigation, WCAG compliance
  • composition.mdx - Composable component patterns
  • as-child.mdx - The as-child pattern for element polymorphism
  • polymorphism.mdx - Polymorphic component patterns
  • types.mdx - TypeScript typing patterns for components
  • state.mdx - Controlled vs uncontrolled state management
  • data-attributes.mdx - Using data attributes for styling and state
  • design-tokens.mdx - Design token systems and theming
  • styling.mdx - Component styling approaches
  • registry.mdx - shadcn-style registry distribution
  • npm.mdx - Publishing components to npm
  • marketplaces.mdx - Component marketplace distribution
  • docs.mdx - Writing component documentation

Source and attribution

Source:vercel/components.buildinskills/building-componentsat commitba72745

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal