Skill

Composition Patterns

Skill

React composition that does not grow a boolean prop for every state.

Official Vercel skill. Compound components, slots, and the APIs that still make sense in a year.

spec·Apache-2.0·Updated this quarter·github.com/vercel-labs/agent-skills

Claude CodeCursorDesktop
Verificado
npx skills add vercel-labs/agent-skills/vercel-composition-patterns

Por Vercel

Entrada

A component that is getting flags.

Saída

A composition that drops the flags.

vercel-composition-patterns.skill/invoke

Você diz

This Button has 11 booleans.

Ela devolve

Split into Button.Root + variants. Diff attached.

Caderno de prompts

Prompts para os quais esta skill foi feita.

  • Você diz

    This Button has 11 booleans.

    Ela devolve

    Split into Button.Root + variants. Diff attached.

  • Você diz

    How should the Field compose?

    Ela devolve

    Field, Label, Control, Error. No layout prop.

O que ela ensina

  1. 01Compound components
  2. 02Slots
  3. 03API shape