The PR marks a row as "Paid" with a rounded <span>, a hard-coded background, and 11px text. The repo already has a Badge (or Tag / Chip) component with tone variants, a size scale, and contrast that was already checked against the surface tokens. Nearby tables use it. The new span uses a different radius, a different font size, and a color that does not exist on the badge variant list.
I've started treating a one-off colored span as a missed component, not as a lighter label. The word is the easy part. Tone, padding, and contrast are why the Badge exists.
Why the homemade badge shows up
A tutorial "status pill" is a span and a background color. The model can write that without finding components/Badge. Your primitive may be named Tag or Chip, or it may live under a status folder, which is easy to miss if the prompt only says "show a paid label."
You also skip the existing icon slot, the rule about not inventing a new tone, and the contrast work that already happened on success, warning, and neutral.
A simple Badge policy
- New status and count labels use the existing Badge component
- Do not add a one-off colored span in a feature file
-
Pick an existing tone (
success,warning,neutral, and whatever the system already names) - A new tone or size is a Badge change, with a story
If the copy is a filter or a removable label, use the Tag or Chip variant the system already has. Do not turn a Badge into a close button in the feature file.
What to put in the prompt
Use the existing Badge (or Tag / Chip) component for this status label.
Do not build a colored span or a one-off pill in this file.
Pick an existing tone and size. Do not invent a new hex or font size.
If you need a new tone, extend the Badge; do not fork it here.
Paste one existing Badge usage and the variant list. In review, search the diff for a raw <span> with a background, a hard-coded hex or Tailwind color on a pill, and a "Paid" / "New" / "Beta" label that is not the shared component.
Reject / send back
Reject
- A feature-level status pill that reimplements the Badge
- A new tone or hex that is not on the Badge variant list
- A Badge used as a removable filter when a Tag or Chip already exists
- A second badge component added for one table
Accept
- A status or count that uses the existing Badge
- A Badge PR that adds a documented tone or size and a story
- A removable filter that uses the existing Tag or Chip, not a forked pill
Top comments (0)