Several at a time
Drag it, swipe it, or turn the wheel. The faster it goes, the more the pictures give way, and their colours come apart. A click lets one grow to the screen.
What it does
Every one of these is a page of the docs.
Its own motion
A spring, solved exactly on every frame. Drag, swipe, the wheel, the keys. It snaps, loops, rests anywhere, goes sideways or downwards.
Options, API and eventsWebGPU first
The canvas asks the browser and loads one layer: WebGPU where it is, WebGL 2 where not. Both draw the same picture, and the tests hold them against each other, effect by effect.
The canvas22 effects, written once
Images that give way to the speed, colours that come apart, lenses and waves under the pointer, slides of jelly and of thick glass. An effect is a few lines of GLSL, and is translated for WebGPU when the shader is made.
Effects21 transitions
One slide turns into the next: liquid, burn, glitch, fold. They follow the pointer, so a slow drag stops half way. What is written for gl-transitions runs as it is.
TransitionsEverything is a plugin
Arrows, dots, keys, autoplay, a ticker, thumbnails, videos that play in view. What is not imported is not in the bundle, and a plugin of your own is a function.
PluginsA lightbox
A click lets the image grow out of its slide to the screen, and one canvas draws all of it: the one of the slider, with its effects, which fade on the way. Drag it there, or the arrows; Escape lets it go back into its slide.
LightboxReact
<Slider> and <Slide>, 596 bytes on the core. Options are props, React renders the slides, the library moves them, and slides that come and go are seen.
ReactNo script of your own
One file of 8.2 KB and attributes in the HTML. The canvas and the lightbox are loaded when a slider asks for them and the page has time.
Without a script
Effects
They go together: here a dome, parallax, and squares in the wake of the pointer that show their part closer, with colours that come apart. Every slide as wide as its picture, and a click lets one grow to the screen.
In numbers
Measured, not guessed: the sizes by the build, the times by the benchmark of the repo, the scores by Lighthouse, of this page as it is built.
- 4.6KBThe core, gzipped
- The core4.6 KB
- With all its options7.0 KB
- useSlider, for React0.2 KB
- canvas(), which chooses0.3 KB
- The layer of WebGPU9.2 KB
- The layer of WebGL 27.2 KB
- The lightbox2.2 KB
- auto.js, with no script8.2 KB
Gzipped, in the bundle of who imports it. A plugin is 0.3 to 1.0 KB, an effect 0.2 to 0.9. A visitor loads one of the two layers, and every part has a budget the build holds it to. More
- 0Dependencies
"dependencies": {}Nothing is installed with it. The layers, the plugins and the effects are files of the library, and a page loads those it names.
- 33msUntil a second slider is drawn by WebGPU. By WebGL: 50 ms
- First slider, WebGPU64 ms
- First slider, WebGL82 ms
- A second, WebGPU33 ms
- A second, WebGL50 ms
- Four more, WebGPU33 ms
- Four more, WebGL169 ms
In Chromium 153. WebGPU has one device for every slider of a page, and a shader is made once for all of them. More
- 20 of 20Sliders of one page on the canvas of WebGPU. WebGL: 12WebGPU20 of 20WebGL12 of 20
A browser gives a page a few WebGL contexts; past them the page draws the slides. WebGPU draws all of them with one device.
- 0Frames drawn while nothing moves
A frame is drawn while something moves, and none once it rests: the page is idle, and so is the GPU. While 6 sliders move, a frame takes 0.33 ms of script.
- 43Effects and transitions
- bend
- cells
- coverflow
- dome
- fan
- glass
- jelly
- magnify
- parallax
- pile
- pixels
- reveal
- shift
- slab
- smear
- split
- spotlight
- stretch
- tilt
- unweave
- wave
- waves
- blocks
- burn
- chroma
- datamosh
- displace
- distance
- fluted
- fold
- glitch
- kaleido
- lens
- liquid
- mosaic
- pixelate
- push
- ripple
- signal
- swirl
- warp
- wind
- zoom
22 effects and 21 transitions, each a few lines of GLSL. Try them all. More
Lighthouse, on this page
- Performance: 97 of 100
- Accessibility: 97 of 100
- Best practices: 100 of 100
- SEO: 100 of 100
- Agentic browsing: 100 of 100
Asked on 2026-09-30, on a phone and on a desktop.
In a page
From the least to load to the least to write. The library is not on npm yet.
import { createSlider } from 'gpuslider';
import { controls, keyboard } from 'gpuslider/plugins';
import 'gpuslider/style.css';
createSlider( element, { loop: true, plugins: [ controls(), keyboard() ] } );WebGPU and WebGL, measured
The same sliders, made with each layer, in the same browser with the same GPU. In every cell: Chromium, and under it WebKit.
| WebGL 2 | WebGPU | |
|---|---|---|
| The first slider of a page is drawn after | 82 ms84 ms | 64 ms80 ms |
| A slider after it | 50 ms51 ms | 33 ms33 ms |
| Four more, made together | 169 ms100 ms | 33 ms33 ms |
| Of 20 sliders on a page, the canvas draws | 1212 | 2020 |
| Script in a frame while 6 sliders move | 0.15 ms0.17 ms | 0.33 ms0.27 ms |
| Frames that came late while 20 sliders moved for 4 s | 0 of 2410 of 240 | 0 of 2410 of 240 |
| The layer in the bundle | 7.2 KB | 9.2 KB |
In Chromium 153 · WebKit 26, both without a window, on Apple M5 with 2 device pixels per pixel, 2026-09-29. Sliders with two effects. The first two lines are the middle of 5 runs. WebGPU has one device for all sliders of a page, and a shader is made once for all of them: so the second slider is there in two frames, and a page has as many sliders on the canvas as it likes. While they move there is no difference to see. What it says, and what it does not
Made of it
Pages that are made of the library, and of little else.

A wall of glass
A wall of pictures behind thick glass, without an end in any direction. Every row is a slider, the rows are the slides of a slider that goes down, and the page takes the pointer and moves both. Drag it.

A reel
One picture or film at a time, as large as the screen, that turn into each other. The screen before it is made of the events of loading(): a number that runs, a curtain that goes up.

Tape
Rows that run against each other on a page that scrolls. The scrolling pushes them, and what is pushed gives way. The loading screen is the one of the library.

Loom
Portraits that run by, and come apart into threads where they leave the screen and where they come in. After Unwoven by Clément Grellier.

Wave
A band of pictures that runs across the screen along a wave, larger in the middle. The slides are in a row as ever: the canvas draws them on the wave.

Depth
A gallery whose pictures move slower than their frames, and a panel that changes how much while it runs: the effects read their numbers on every frame.







