You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(Badge): change children to label prop for API consistency #706
Vibe testing shows that LLMs hallucinate <XDSBadge label="Active" /> instead of <XDSBadge>Active</XDSBadge>100% of the time when Badge docs aren't provided. With docs, they get it right 100%.
The cause: Badge uses children for its text content, but the surrounding components it's commonly used alongside all use label:
XDSButton label="Submit"
XDSToken label="React"
XDSListItem label="Settings"
This creates a strong pattern: short-text leaf components use label. Badge breaks this pattern.
Vibe test results
Condition
children
label (hallucinated)
With Badge docs
8/8 (100%)
0/8
Without Badge docs
0/8
8/8 (100%)
The test placed Badge alongside Button, Token, and ListItem in realistic scenarios (profile cards, task rows, filter bars, nav items). The label pattern was especially strong in P5 (filter bar with tokens) and P7 (role badges next to buttons).
Proposal
Change Badge's primary text prop from children to label:
Activity
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency with Button/Token
feat(Badge): add label prop for API consistency (#709)
feat(Badge): add label prop for API consistency (#709)
feat(Badge): add label prop for API consistency (#709)
feat(Badge): add label prop for API consistency (#709)