Skip to content
npm ↗ GitHub ↗

Documentation

12/Content

Stats

Large figures with a label, in a box with 1px dividers.

Four figures

24hTiempo de respuesta
100%Código entregado
2 semCiclo de entregas
1:1Soporte directo
HTML
<div class="cb-stats mt-0">
  <div class="cb-stat"><strong class="cb-stat__value">24h</strong><span class="cb-stat__label">Tiempo de respuesta</span></div>
  <div class="cb-stat"><strong class="cb-stat__value">100%</strong><span class="cb-stat__label">Código entregado</span></div>
  <div class="cb-stat"><strong class="cb-stat__value">2 sem</strong><span class="cb-stat__label">Ciclo de entregas</span></div>
  <div class="cb-stat"><strong class="cb-stat__value">1:1</strong><span class="cb-stat__label">Soporte directo</span></div>
</div>

With change

IngresosQ 48,210+12.4% vs. mes anterior
Pedidos312+3.1%
Devoluciones9−2 casos
HTML
<div class="cb-stats cb-stats--3 mt-0">
  <div class="cb-stat"><span class="cb-stat__label">Ingresos</span><strong class="cb-stat__value">Q 48,210</strong><span class="cb-stat__delta">+12.4% vs. mes anterior</span></div>
  <div class="cb-stat"><span class="cb-stat__label">Pedidos</span><strong class="cb-stat__value">312</strong><span class="cb-stat__delta">+3.1%</span></div>
  <div class="cb-stat"><span class="cb-stat__label">Devoluciones</span><strong class="cb-stat__value">9</strong><span class="cb-stat__delta cb-stat__delta--down">−2 casos</span></div>
</div>

Classes and modifiers

ClassDescription
.cb-stats4-column box (2 below 960px). The inner lines don't depend on the number of cells.
.cb-stats--2, .cb-stats--3Two or three columns.
.cb-statCell.
.cb-stat__valueFigure with clamp(28px, 3.4vw, 40px).
.cb-stat__labelLabel.
.cb-stat__deltaChange in green; --down in red.

Accessibility

  • Don't rely on color alone for the change: include the sign or text.