Pixel UI/Navigation/Tabs

Tabs

Tabs whose highlight slides across with a dithered pixel trail.

<piix-tabs>WebGL

Everything you need to ship a loud landing page.

One script tag, or npm install piixpal.

Heroes, pricing, dashboards, 404 pages.

Free. Forever. MIT.

Palette

Each child with a label becomes a tab. Pick one and the lit block slides over on the GPU, leaving a trail of dithered pixels behind it.

Installation

<!-- once, anywhere on the page: every component -->
<script src="https://cdn.jsdelivr.net/npm/piixpal@0.6/piixpal.min.js"></script>

Usage

<piix-tabs>
  <div label="Overview"><p>Everything you need to ship a loud landing page.</p></div>
  <div label="Install"><p>One script tag, or npm install piixpal.</p></div>
  <div label="Examples"><p>Heroes, pricing, dashboards, 404 pages.</p></div>
  <div label="Pricing"><p>Free. Forever. MIT.</p></div>
</piix-tabs>

API reference

AttributeWhat it doesDefault
selectedwhich tab is open, from 00
palettethe colours: lime aurora sunset ocean candy violet fire gameboy paper mono, or your own, dark to light: "#000,#6b4cff,#fff"lime
pixelsize of one pixel, in px3

Events

EventWhen
changedetail.index and detail.label

Accessibility