cv-chip
Compact interactive token for filters, applied facets, tags, and secondary action clusters.
Use cv-chip when the visible token does something: activates a filter editor, toggles a value through cv-chip-group, or exposes a dedicated remove action.
Usage
Anatomy
<cv-chip> (host)
└── <span part="base" role="button">
├── <span part="prefix">
├── <span part="label">
├── <span part="suffix">
└── <button part="remove-button"> optionalAttributes
| Attribute | Type | Default | Description |
|---|---|---|---|
value | String | "" | Value used by chip-group selection |
selected | Boolean | false | Selected state |
disabled | Boolean | false | Blocks chip action and remove events |
removable | Boolean | false | Shows remove button |
variant | String | "neutral" | Visual variant |
size | String | "medium" | "small", "medium", or "large" |
pill | Boolean | false | Fully rounded chip shape |
Slots
| Slot | Description |
|---|---|
(default) | Chip label |
prefix | Leading content |
suffix | Trailing content |
CSS Parts
| Part | Description |
|---|---|
base | Action surface |
prefix | Prefix slot wrapper |
label | Default slot wrapper |
suffix | Suffix slot wrapper |
remove-button | Remove action button |
Events
| Event | Detail | Description |
|---|---|---|
cv-chip-action | { value: string, source: "click" | "keyboard" } | Emitted by a chip activation |
cv-chip-remove | { value: string } | Emitted by a chip remove button |
Keyboard
| Key | Behavior |
|---|---|
Enter/Space | Activates the focused chip |
Arrow-key roving focus is handled by cv-chip-group, not by a standalone chip.
When to use chip vs badge
| Need | Use |
|---|---|
| Applied filter, selected tag, quick facet, removable tag | cv-chip |
| Passive state, count, warning label, status dot | cv-badge |
| Single or multiple selection across several chips | cv-chip-group |
Behavior notes
selectedchanges the pressed state and maps toaria-pressed.disabledremoves the chip from tab order and blocks action/remove events.removableadds a nested remove button that emitscv-chip-removewithout also emittingcv-chip-action.valueis the stable payload consumed by events and bycv-chip-group.