Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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
.claude/skills/rampstackco-frontend-component-build/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 209% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 91% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-17 | ✓→✓ | = Same ✓ | 62% | 0% |
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.<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.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→pass | 15,051 | 14,348 | -5% | 1 | 1 | 0% | 2,873 | 4,647 | +62% | 0 | 0 | — |
case-01 | fail→fail | 27,714 | 27,907 | +1% | 1 | 1 | 0% | 6,204 | 8,086 | +30% | 0 | 0 | — |
case-02 | fail→fail | 28,077 | 26,569 | -5% | 1 | 1 | 0% | 6,202 | 8,084 | +30% | 0 | 0 | — |
case-03 | fail→pass | 28,278 | 29,964 | +6% | 1 | 1 | 0% | 6,049 | 8,076 | +34% | 0 | 0 | — |
case-04 | pass→pass | 25,096 | 21,459 | -14% | 1 | 1 | 0% | 4,596 | 5,548 | +21% | 0 | 0 | — |
case-05 | pass→pass | 21,635 | 29,108 | +35% | 1 | 1 | 0% | 3,480 | 7,615 | +119% | 0 | 0 | — |
case-06 | fail→pass | 6,609 | 6,530 | -1% | 1 | 1 | 0% | 917 | 2,837 | +209% | 0 | 0 | — |
case-07 | fail→pass | 11,291 | 10,298 | -9% | 1 | 1 | 0% | 2,014 | 3,846 | +91% | 0 | 0 | — |
case-08 | pass→pass | 14,080 | 13,234 | -6% | 1 | 1 | 0% | 2,502 | 3,931 | +57% | 0 | 0 | — |
case-09 | pass→pass | 12,737 | 10,314 | -19% | 1 | 1 | 0% | 2,224 | 3,520 | +58% | 0 | 0 | — |
case-10 | pass→pass | 12,929 | 11,057 | -14% | 1 | 1 | 0% | 1,956 | 3,818 | +95% | 0 | 0 | — |
case-11 | pass→pass | 14,125 | 12,564 | -11% | 1 | 1 | 0% | 2,373 | 4,136 | +74% | 0 | 0 | — |
case-16 | pass→pass | 13,544 | 11,009 | -19% | 1 | 1 | 0% | 2,191 | 3,708 | +69% | 0 | 0 | — |
case-12 | pass→pass | 13,885 | 8,500 | -39% | 1 | 1 | 0% | 2,310 | 3,410 | +48% | 0 | 0 | — |
case-13 | pass→pass | 16,023 | 10,251 | -36% | 1 | 1 | 0% | 2,407 | 3,413 | +42% | 0 | 0 | — |
case-14 | pass→pass | 11,396 | 9,564 | -16% | 1 | 1 | 0% | 1,773 | 3,360 | +90% | 0 | 0 | — |
case-15 | pass→pass | 16,647 | 15,831 | -5% | 1 | 1 | 0% | 2,788 | 4,437 | +59% | 0 | 0 | — |
case-18 | pass→pass | 11,864 | 8,471 | -29% | 1 | 1 | 0% | 2,128 | 3,243 | +52% | 0 | 0 | — |
case-19 | fail→pass | 13,205 | 7,872 | -40% | 1 | 1 | 0% | 2,014 | 3,064 | +52% | 0 | 0 | — |
case-20 | pass→pass | 11,040 | 11,637 | +5% | 1 | 1 | 0% | 1,926 | 3,962 | +106% | 0 | 0 | — |
case-21 | pass→pass | 14,304 | 12,211 | -15% | 1 | 1 | 0% | 2,476 | 3,802 | +54% | 0 | 0 | — |
case-22 | pass→pass | 10,955 | 6,777 | -38% | 1 | 1 | 0% | 1,846 | 2,992 | +62% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.