feat: restyle KvChip to the 2026 spec - #900
Merged
Merged
Conversation
Outlined by default, filling on hover, rather than filled by default. Surface and text are themable, since every value in the spec lands on a token, but the border is a static gray-300: border-tertiary resolves to white in the marigold and stone themes, which would leave the chip with no visible outline. The wrapper div is gone so the root is the button, which also gains a type attribute and the first tests this component has had.
eddieferrer
marked this pull request as ready for review
September 9, 2026 19:12
dyersituations
approved these changes
Sep 9, 2026
mcstover
approved these changes
Sep 9, 2026
Design confirmed a chip should look the same on every surface. Every value in the spec has an exact static token, so the surface, text and hover fill move to white, eco-green-4 and eco-green-1. This also retires the border-tertiary problem: that token resolves to white in the marigold and stone themes, so a themable border had no consistent value.
Collaborator
Author
|
Design confirmed the chip should not be themeable here: https://www.figma.com/design/TPmBUB4olYPMF6glEhBGDG/Ecosystem-2026--WIP-?node-id=20961-22768#1919728053 |
mcstover
approved these changes
Sep 9, 2026
dyersituations
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: https://kiva.atlassian.net/browse/CIT-4883
Figma
Summary
Verified against the Figma spec by measuring the rendered element rather than reading
class names:
#ffffffsurface,#edf4f1hover,#223829text and icon, 1px#c4c4c4border, 8px radius, 16x8 padding, 8px gap, 16/22 type at weight 300. Every value
matches.
surface. Every value in the spec has an exact static token, so no hardcoded hex was
needed —
tw-bg-white,hover:tw-bg-eco-green-1,tw-text-eco-green-4,tw-border-gray-300. TheThemesstory renders the chip inside all five themeproviders to show it does not vary.
divis gone, so the root is thebuttonitself. It also gainstype="button", which it was missing.class creeps back in, the emit, the button-as-root structure, jest-axe, and a
regression test for an undeclared
@clickstill falling through —FilterChipsincms-page-server relies on that.
The second commit reverses the first on the themable question. The first version used
themable tokens because every spec value happens to land on one; design then confirmed
the chip should be fixed. Worth knowing the themable version also had a real bug that the
Themesstory caught:border-tertiaryresolves to#FFFFFFin the marigold and stonethemes, so the chip would have had no visible outline on those surfaces. Fixed colors
retire that problem entirely.
Not an API break
click-chipis unchanged and a consumer's plain@clickstill fires, so this is a minor.The visual change is large though, and Chromatic diffs on every chip are the point rather
than noise.
Consumer follow-ups
Three live call sites exist, all of which get simpler:
FilterChipshas:deep(button)forcingtw-bg-gray-200andborder-radius: 8px, plus:deep(button > div)shrinking the labelto 14px. All three are now dead: 8px is the spec, the grey approximated a neutral chip,
and the slot's wrapper
divno longer exists.EmailDomainInputwraps its label in<h4 class="tw-text-upper">. Consumers should not be overriding the chip's text size, sothose come out and both call sites take the spec's 16px.
KvChipClassicused once inLoanSearchFilters, and a localKvChipthat nothingimports at all. That ticket is a migration plus deleting dead code, and note
KvChipClassicemitsclickwhere the library emitsclick-chip.