rampstackco/claude-frontend-component-build
Build production-ready frontend components with accessible markup, sensible props, defined states, and tested behavior. Use this skill whenever the user wants to build a component from scratch, refactor an existing one, design a component API, or implement a UI element with proper states and accessibility. Triggers on build a component, create a button, create a modal, create a form input, component API, props design, component states, refactor component, accessible component. Also triggers when implementing UI from a design that needs to be reusable.
This is a copy. The original lives at rampstackco/frontend-component-build.
npx skills add https://github.com/rampstackco/claude-skills --skill frontend-component-build
Build production-ready components. Stack-agnostic principles. Most patterns translate to React, Vue, Svelte, or vanilla web components.
This skill is about implementing a component well. For broader system design see design-system. For day-to-day visual decisions see design-standards.
design-system)design-standards)code-review-web)performance-optimization)A complete component handles six dimensions. Skip any one and the component is incomplete.
Identify the parts that make up the component before writing any markup.
Common anatomies:
Naming the parts up front makes the API obvious.
What variations does the component support?
Variants should be a managed set, not a free-for-all. Document the supported set; reject requests for new variants without a real use case.
What states must the component handle?
Every state needs visual treatment AND accessibility treatment.
Design the component's contract.
API design principles:
variant: "primary" | "secondary" | "ghost" over primary={true} ghost={false}.headerText and bodyText props when slots work.Build it accessible from the start. Adding accessibility later is 5x harder.
Universal:
<button>, <a>, <nav>, <form>, etc.) over generic <div>Component-specific:
<button>. Don't fake one with a <div>.role="dialog" and aria-labelledby.for/id or aria-labelledby. Error messages linked via aria-describedby. aria-invalid when in error state.<button> with aria-pressed for two-state, or role="switch" for on/off.role="tablist" / role="tab" / role="tabpanel" with aria-selected and arrow-key navigation.aria-live so screen readers know something changed.Verify the component works before declaring it done.
Test types by priority:
A component without at least automated accessibility testing is not done.
<div> for interactive things.10. Document. Usage, API, examples, anti-patterns.
<div onClick>. Loses keyboard accessibility, screen reader semantics, and focus. Use <button> or <a>.<Button primary large rounded fullWidth disabled icon />. Too many booleans means you actually need fewer variants designed more thoughtfully.aria-disabled AND not respond to clicks.aria-live="polite" or role="status".A complete component delivery includes:
references/component-spec-template.md - Template for documenting a component (props, states, accessibility, edge cases) before building.references/component-api-patterns.md - Common patterns for designing flexible component APIs (compound components, controlled vs uncontrolled, polymorphic as prop, render props, slots).references/accessibility-patterns.md - ARIA patterns for common interactive components.Take rampstackco/claude-frontend-component-build from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.