/* =========================
Chips
Figma: Badge type / filter chips.
========================= */
@use "../kit-deps" as *;
.chip {
display: inline-flex;
align-items: center;
justify-content: center;
gap: $space-1;
min-height: 28px;
padding: $space-1 $space-3;
font-family: $font-family-base;
font-size: 13px;
font-weight: $font-weight-medium;
line-height: 1;
text-transform: none;
white-space: nowrap;
border-radius: $radius-full;
background-color: $neutral-100;
color: $neutral-900;
transition:
background-color $motion-base $motion-ease,
color $motion-base $motion-ease;
.chip-remove {
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
padding: 0;
margin-left: $space-1;
border: 0;
border-radius: 50%;
background: transparent;
color: currentColor;
cursor: pointer;
opacity: 0.7;
transition: opacity $motion-base $motion-ease;
&:hover {
opacity: 1;
}
&:focus-visible {
@include focus_ring;
}
}
// Variants
&.chip-primary {
background-color: $neutral-900;
color: $neutral-25;
}
&.chip-secondary {
background-color: $mint-300;
color: $neutral-900;
}
&.chip-accent {
background-color: $yellow-300;
color: $neutral-900;
}
&.chip-outline {
background-color: transparent;
border: $border-width-base $border-style-base $neutral-300;
color: $neutral-700;
&:hover {
border-color: $neutral-400;
color: $neutral-900;
}
}
// Sizes
&.chip-sm {
min-height: 22px;
padding: 2px $space-2;
font-size: 11px;
.chip-remove {
width: 12px;
height: 12px;
}
}
&.chip-lg {
min-height: 34px;
padding: $space-1 $space-4;
font-size: 14px;
}
}
.chip-group {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: $space-2;
}