22 CSS Button Group Designs

Pixel Matrix

Pagination styled as a tiny LED matrix display. Each page is a "pixel cluster"; the active page lights up like a real 7-segment with phosphor glow.

Pure CSS MIT licensed

Pixel Matrix the 6th of 22 designs in the 22 CSS Button Group Designs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.

Live preview

Open in playground

The code

<nav class="cbgp-pixel" aria-label="Pagination">
  <button type="button" aria-label="First page" aria-disabled="true">«</button>
  <button type="button" aria-label="Previous page" aria-disabled="true">‹</button>
  <button type="button" aria-current="page">1</button>
  <button type="button">2</button>
  <button type="button">3</button>
  <button type="button">4</button>
  <button type="button">5</button>
  <button type="button" aria-label="Next page">›</button>
  <button type="button" aria-label="Last page">»</button>
</nav>
.cbgp-pixel {
  display: inline-flex; gap: 3px;
  padding: 6px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(0,255,224,0.06), transparent 70%),
    #050810;
  border: 1px solid rgba(0,255,224,0.15);
  border-radius: 6px;
  box-shadow: inset 0 0 12px rgba(0,255,224,0.05), 0 4px 14px rgba(0,0,0,0.5);
}
.cbgp-pixel button {
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(0,255,224,0.18);
  background:
    radial-gradient(circle at center, rgba(0,255,224,0.06) 0%, transparent 70%),
    #0a0d18;
  color: rgba(220,225,230,0.55);
  font: 800 12px/1 ui-monospace, monospace;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.18s;
}
.cbgp-pixel button:hover {
  border-color: rgba(0,255,224,0.5);
  color: #c8fffa;
  background:
    radial-gradient(circle at center, rgba(0,255,224,0.16) 0%, transparent 70%),
    #0a0d18;
}
.cbgp-pixel button[aria-current="page"] {
  background: radial-gradient(circle at center, #00ffe0 0%, #00b8a8 70%);
  border-color: #00ffe0;
  color: #001f1c;
  box-shadow: 0 0 14px rgba(0,255,224,0.6), inset 0 0 6px rgba(255,255,255,0.4);
  text-shadow: 0 0 4px rgba(0,255,224,0.6);
}
.cbgp-pixel button[aria-disabled="true"] {
  opacity: 0.3; cursor: not-allowed;
  background: transparent; border-color: rgba(0,255,224,0.08);
}
.cbgp-pixel button[aria-disabled="true"]:hover {
  border-color: rgba(0,255,224,0.08); color: rgba(220,225,230,0.55);
}
.cbgp-pixel button:focus-visible { outline: 2px solid #00ffe0; outline-offset: 2px; }

Search CodeFronts

Loading…