Pixel UI/Forms/Slider

Slider

A range input whose track is lit on the GPU.

<piix-slider>WebGL
Volume
Palette

The filled part of the track glows through the palette with a slow shimmer; the head is a bright pixel block with a halo, and dragging it fast throws sparks behind it. While you drag or focus it, the value floats above the head.

Installation

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

Usage

<piix-slider name="volume" value="64" suffix="%">Volume</piix-slider>

Examples

Steps and a range

Delay

API reference

AttributeWhat it doesDefault
value, min, max, stepas on a range input50, 0, 100, 1
namethe form field name–
suffixshown after the value–
palettethe colours of the lightlime
disabled––
pixelsize of one pixel, in px3

Events

EventWhen
inputwhile it moves
changewhen you let go, or after a key press

Accessibility