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
Scanned
npx skills add vercel-labs/agent-skills/vercel-composition-patterns

By Vercel

Input

A component that is getting flags.

Output

A composition that drops the flags.

vercel-composition-patterns.skill/invoke

You say

This Button has 11 booleans.

It returns

Split into Button.Root + variants. Diff attached.

Prompt notebook

Prompts this skill is built for.

  • You say

    This Button has 11 booleans.

    It returns

    Split into Button.Root + variants. Diff attached.

  • You say

    How should the Field compose?

    It returns

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

What it teaches

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