Pular para o conteúdo
Kitbay
Skill

Shade inputSurface recipe

MITAtualizado em 11 de nov. de 202655.770Estrelas no GitHub

A maintainer skill in Ghost's repository for Shade, Ghost's React component library, that fires when someone edits one of its form control components.

O que a skill ensina

A maintainer skill in Ghost's repository for Shade, Ghost's React component library, that fires when someone edits one of its form control components. It tells the agent to style the shared parts of a form control, its border, background, corner radius, focus ring, invalid and disabled states, through the library's inputSurface recipe rather than hand-written classes. Self mode goes on an element that takes focus, such as an input or textarea, and within mode on a wrapper whose child takes focus. Callers still set height, padding, type, icons and layout. It warns against dynamic Tailwind class names, which the compiler cannot detect, and points to the recipe's source file and Storybook page.

O que faz

  • Apply shared form control styling
  • Choose self or within focus mode
  • Avoid hand-rolled focus and invalid styles