DOTS free pack · 28 buttons

The Dot Matrix kit.
28 buttons. Click every one.

You loved the Dot Matrix toggle, so here is every button in the same style, running live. Each one is a single web component: one file, no dependencies, works in any site or framework. Click one, copy its code, or take all 28.

How to use one

Every button works the same way, so you can swap one for another by changing a single tag.

01

Add the file

Download a button (or copy its code into like.js) and load it with <script type="module">.

02

Drop in the tag

Put <dot-like> anywhere and give it a size. It scales to fit its box.

03

Listen for changes

Read .checked, call .toggle() to play it, or listen for the change event. React, Vue and Svelte all work.

All 28 buttons

The ones from the reel come first. Click any of them; drags, turns and swipes play by themselves.

Click it

Theme toggle

The original. The moon breaks into dots, passes a sunset and re-forms as a sun.

toggle.js 17 KB
How to use it
<script type="module" src="toggle.js"></script>

<dot-toggle style="display:block; width:360px; height:220px"></dot-toggle>

<script type="module">
  const b = document.querySelector("dot-toggle");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Like

The outline heart folds into a solid crimson heart. Only the last digit rolls: 1,203 to 1,204.

like.js 27 KB
How to use it
<script type="module" src="like.js"></script>

<dot-like style="display:block; width:360px; height:220px"></dot-like>

<script type="module">
  const b = document.querySelector("dot-like");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Download

The arrow streams its dots into an amber bar, and the bar turns into a check.

download.js 25 KB
How to use it
<script type="module" src="download.js"></script>

<dot-download style="display:block; width:360px; height:220px"></dot-download>

<script type="module">
  const b = document.querySelector("dot-download");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Play

The triangle splits into pause bars and an equaliser lights up in the black.

play.js 21 KB
How to use it
<script type="module" src="play.js"></script>

<dot-play style="display:block; width:360px; height:220px"></dot-play>

<script type="module">
  const b = document.querySelector("dot-play");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Delete

The file jumps into the bin and the lid snaps shut.

delete.js 22 KB
How to use it
<script type="module" src="delete.js"></script>

<dot-delete style="display:block; width:360px; height:220px"></dot-delete>

<script type="module">
  const b = document.querySelector("dot-delete");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Brightness

Drag the sun. Its rays grow and the whole control goes from night to day under your finger.

brightness.js 21 KB
How to use it
<script type="module" src="brightness.js"></script>

<dot-brightness style="display:block; width:360px; height:220px"></dot-brightness>

<script type="module">
  const b = document.querySelector("dot-brightness");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Passcode

Click once: a wrong code shakes and the dots scatter. Click again: the right code merges and opens.

passcode.js 29 KB
How to use it
<script type="module" src="passcode.js"></script>

<dot-passcode style="display:block; width:360px; height:220px"></dot-passcode>

<script type="module">
  const b = document.querySelector("dot-passcode");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Thermostat

Turn it from 18 to 26. The arc lights dot by dot and the colour sweeps from ice to red.

dial.js 24 KB
How to use it
<script type="module" src="dial.js"></script>

<dot-dial style="display:block; width:360px; height:220px"></dot-dial>

<script type="module">
  const b = document.querySelector("dot-dial");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Charging

Plug it in and the dots pour in like sand, with the bolt left in the pile.

battery.js 23 KB
How to use it
<script type="module" src="battery.js"></script>

<dot-battery style="display:block; width:360px; height:220px"></dot-battery>

<script type="module">
  const b = document.querySelector("dot-battery");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Mute

A slash draws across the speaker and the sound arcs fall like beads.

mute.js 22 KB
How to use it
<script type="module" src="mute.js"></script>

<dot-mute style="display:block; width:360px; height:220px"></dot-mute>

<script type="module">
  const b = document.querySelector("dot-mute");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Timer

Ten seconds run out one dot at a time, then the face pulses at zero.

timer.js 25 KB
How to use it
<script type="module" src="timer.js"></script>

<dot-timer style="display:block; width:360px; height:220px"></dot-timer>

<script type="module">
  const b = document.querySelector("dot-timer");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Five stars

Drag across and each star fills like liquid, then they sparkle in a wave.

stars.js 22 KB
How to use it
<script type="module" src="stars.js"></script>

<dot-stars style="display:block; width:360px; height:220px"></dot-stars>

<script type="module">
  const b = document.querySelector("dot-stars");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Send

The paper plane flies out across the black and a check lands on the key.

send.js 23 KB
How to use it
<script type="module" src="send.js"></script>

<dot-send style="display:block; width:360px; height:220px"></dot-send>

<script type="module">
  const b = document.querySelector("dot-send");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Copy

A second sheet lifts off and lands behind the first. OK.

copy.js 24 KB
How to use it
<script type="module" src="copy.js"></script>

<dot-copy style="display:block; width:360px; height:220px"></dot-copy>

<script type="module">
  const b = document.querySelector("dot-copy");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Hold to confirm

A ring of dots runs around the key, then bursts into a check.

hold.js 24 KB
How to use it
<script type="module" src="hold.js"></script>

<dot-hold style="display:block; width:360px; height:220px"></dot-hold>

<script type="module">
  const b = document.querySelector("dot-hold");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Record

The record dot becomes a stop square and the time starts counting.

record.js 27 KB
How to use it
<script type="module" src="record.js"></script>

<dot-record style="display:block; width:360px; height:220px"></dot-record>

<script type="module">
  const b = document.querySelector("dot-record");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Volume

Drag the thumb and the level bars light up behind it.

volume.js 20 KB
How to use it
<script type="module" src="volume.js"></script>

<dot-volume style="display:block; width:360px; height:220px"></dot-volume>

<script type="module">
  const b = document.querySelector("dot-volume");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Scrubber

Drag the playhead. The waveform lights up behind it.

scrubber.js 21 KB
How to use it
<script type="module" src="scrubber.js"></script>

<dot-scrubber style="display:block; width:360px; height:220px"></dot-scrubber>

<script type="module">
  const b = document.querySelector("dot-scrubber");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Slide to unlock

The chevrons get swallowed as the key passes, then the shackle opens.

slide.js 23 KB
How to use it
<script type="module" src="slide.js"></script>

<dot-slide style="display:block; width:360px; height:220px"></dot-slide>

<script type="module">
  const b = document.querySelector("dot-slide");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Segmented control

The key springs between list, grid and focus, like the toggle knob.

segmented.js 20 KB
How to use it
<script type="module" src="segmented.js"></script>

<dot-segmented style="display:block; width:360px; height:220px"></dot-segmented>

<script type="module">
  const b = document.querySelector("dot-segmented");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Lock

The padlock shackle springs open.

lock.js 20 KB
How to use it
<script type="module" src="lock.js"></script>

<dot-lock style="display:block; width:360px; height:220px"></dot-lock>

<script type="module">
  const b = document.querySelector("dot-lock");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Bell

The bell swings like a pendulum and rings out.

bell.js 20 KB
How to use it
<script type="module" src="bell.js"></script>

<dot-bell style="display:block; width:360px; height:220px"></dot-bell>

<script type="module">
  const b = document.querySelector("dot-bell");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Wi-Fi

The arcs search, lock on with a spark, and the network name types in.

wifi.js 25 KB
How to use it
<script type="module" src="wifi.js"></script>

<dot-wifi style="display:block; width:360px; height:220px"></dot-wifi>

<script type="module">
  const b = document.querySelector("dot-wifi");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Stepper

The old digit falls out with gravity and the new one drops in. At the limit, it refuses.

stepper.js 26 KB
How to use it
<script type="module" src="stepper.js"></script>

<dot-stepper style="display:block; width:360px; height:220px"></dot-stepper>

<script type="module">
  const b = document.querySelector("dot-stepper");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Checkbox

The tick is drawn like a pen stroke and the task gets struck through.

checkbox.js 25 KB
How to use it
<script type="module" src="checkbox.js"></script>

<dot-checkbox style="display:block; width:360px; height:220px"></dot-checkbox>

<script type="module">
  const b = document.querySelector("dot-checkbox");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Pull to refresh

Pull it down like elastic. It snaps into a spinner, then a check.

pull.js 27 KB
How to use it
<script type="module" src="pull.js"></script>

<dot-pull style="display:block; width:360px; height:220px"></dot-pull>

<script type="module">
  const b = document.querySelector("dot-pull");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>
Click it

Notifications

Swipe the top card and it breaks into dots. The ones behind spring forward.

stack.js 26 KB
How to use it
<script type="module" src="stack.js"></script>

<dot-stack style="display:block; width:360px; height:220px"></dot-stack>

<script type="module">
  const b = document.querySelector("dot-stack");
  b.addEventListener("change", (e) => console.log("on?", e.detail.checked));
  // b.toggle();   plays the whole interaction (drags and turns included)
</script>