Skip to content

Chip

hc-chip is a small pill for facts and attributes: capabilities on a role, tags on a record, applied filters above a list. It is deliberately quiet — neutral surface and border, no variant axis. Pure CSS, no behavior.

  • read:members
  • write:members
  • admin:realm

.hc-chips strips the list chrome and wraps chips on a consistent gap. Keeping the <ul>/<li> structure makes the set announceable as a list (“3 items”). A standalone chip works on any inline element:

<span class="hc-chip">beta</span>
UseFor
hc-chipNeutral facts/attributes, usually several at once (capabilities, tags).
hc-badgeA single status label with semantic color (data-variant).
.hc-statusStatus color on text that isn’t a pill (table cells, rows).
hc-multicombobox tagsChips with a remove control, managed by the input.

A chip pairs with the .hc-icon helper for a leading glyph (the built-in gap handles the spacing):

<li class="hc-chip">
<svg class="hc-icon" aria-hidden="true"></svg>
read:members
</li>
  • Chips are static text — no roles needed beyond the list semantics of .hc-chips.
  • Interactive “chips” (removable, toggleable) are a different pattern: use a real <button> (e.g. inside hc-multicombobox) or hc-toggle-group, not a click handler on a chip.
Token pathPurpose
chip.bgBackground.
chip.fgText color.
chip.borderBorder color.
chip.radiusPill radius.
chip.padding-x / chip.padding-yPadding.
chip.font-sizeFont size.
chip.gapGap between chips in .hc-chips.
Show the generated CSS variables
--hc-chip-bg | -fg | -border
--hc-chip-radius
--hc-chip-padding-x | -padding-y
--hc-chip-font-size
--hc-chip-gap