Skip to content
npm ↗ GitHub ↗

Documentation

20/Actions and labels

Chips and tags

Chips with a color swatch for filters or technologies, status tags and the kbd key.

Chips

The swatch color comes from --cb-chip-color; it defaults to the accent.

HTML
<div class="cb-chips">
  <a class="cb-chip" href="#"><i class="cb-chip__swatch" style="--cb-chip-color: var(--cb-accent-800)"></i>Laravel</a>
  <a class="cb-chip" href="#"><i class="cb-chip__swatch" style="--cb-chip-color: var(--cb-accent-600)"></i>React Native</a>
  <a class="cb-chip" href="#"><i class="cb-chip__swatch"></i>Kotlin</a>
  <a class="cb-chip" href="#"><i class="cb-chip__swatch" style="--cb-chip-color: var(--cb-accent-300)"></i>Docker</a>
  <button class="cb-chip" type="button" aria-pressed="true"><i class="cb-chip__swatch" style="--cb-chip-color: var(--cb-success)"></i>Filtro activo</button>
</div>

Status tags

Por proyecto Activo Pagado Pendiente Vencido Borrador
HTML
<span class="cb-tag">Por proyecto</span>
<span class="cb-tag cb-tag--live">Activo</span>
<span class="cb-tag cb-tag--success">Pagado</span>
<span class="cb-tag cb-tag--warning">Pendiente</span>
<span class="cb-tag cb-tag--danger">Vencido</span>
<span class="cb-tag cb-tag--info">Borrador</span>

Keyboard shortcuts

Buscar ⌘ K · Cerrar Esc · Navegar ↑ ↓
HTML
<span class="text-cb-sm text-cb-muted">Buscar <kbd>⌘</kbd> <kbd>K</kbd> · Cerrar <kbd>Esc</kbd> · Navegar <kbd>↑</kbd> <kbd>↓</kbd></span>

Classes and modifiers

ClassDescription
.cb-chipsRow of chips that wraps.
.cb-chipRounded chip. .is-active or aria-pressed="true" highlights it.
.cb-chip__swatchColor swatch (--cb-chip-color).
.cb-tagStatus label.
.cb-tag--live|accent|success|warning|danger|infoColor variants.
kbd, .cb-kbdShortcut key.

Accessibility

  • If a chip filters content, make it a button with aria-pressed.
  • Tag variants have AA contrast in every theme.