Skip to content

Tokens / Chips

Small and large tokens for labels, filters, and removable chips in @bnotk/dsx.

Live Preview
<link rel="stylesheet" href="@bnotk/dsx/css/tokens-chips.css">

Or use the full bundle:

<link rel="stylesheet" href="@bnotk/dsx/css/index.css">
ClassPurpose
.dsx-tokenBase small token
.dsx-token--removableAdds room for a remove affordance
.dsx-token__removeCircular remove button / affordance
.dsx-token--lgLarge token size
.dsx-token--mainMain brand token
.dsx-token--highlightHighlight-toned token
.dsx-token-listWrapping layout container for multiple tokens
  • Base tokens use var(--ds2-color-grey-1) with a var(--ds2-color-grey-2) border.
  • .dsx-token--main switches to a navy background with white text.
  • .dsx-token--highlight uses var(--ds2-color-highlight-light) and var(--ds2-color-highlight).
  • .dsx-token__remove shows an × via ::after and darkens on hover.
  • Large tokens increase padding, font size, gap, and remove-button size.
<div class="dsx-token-list">
<span class="dsx-token">Default</span>
<span class="dsx-token dsx-token--main">Primary</span>
<span class="dsx-token dsx-token--highlight dsx-token--removable">
Filter: Open
<button class="dsx-token__remove" type="button" aria-label="Remove filter Open"></button>
</span>
</div>
  • Use a real <button type="button"> for removable chips.
  • Give the remove control an aria-label that includes the token name.
  • Keep the text label visible so the chip meaning is not color-only.