Sensor — minimum dwell
Variant: Minimum dwell
An app opens the microphone for 394ms. If the light lasted as long as the access, nobody would see it — so the light fills for the access, drains to a hollow ring the instant the mic closes, and stays on as "Mic used recently" until at least 2.5s have passed since access began. The ring is the honest half: it does not pretend the mic is still open, and it does not let a short grab go unwitnessed. A two-lane timeline underneath makes the rule legible, with a playhead and a lit copy of both lanes on one linear clock, so the lit copy only ever claims what has already happened; the light’s keyframes are the same sweep fractions, so the dot fills on the frame the head reaches the segment. Use it wherever access can be shorter than attention — background mic checks, clipboard reads, location pings — and the indicator has to outlive the event to mean anything.
The source
A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Sensor — minimum dwell</title>
<style>
:root {
/* Neutrals — fixed, never remixed. */
--ivory: #faf9f5;
--paper: #ffffff;
--oat: #e3dacc;
--slate: #141413;
/* Knobs — the remix API. A knob exists iff declared here and used below. */
--hue: 38.8;
--lift: 0;
--chroma: 1;
--round: 1;
--speed: 1;
/* Accents — derived from the knobs with the family's offsets baked in,
so one hue roll moves them together. Defaults reproduce the original hex. */
--clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
--clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
--olive: oklch(
calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3)
);
--rust: oklch(
calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3)
);
/* Clock — 6.4s, so 1% is 64ms. The playhead crosses the timeline in
the first 88% (5.63s); the rest is a reset in the dark. On that
sweep the mic is open from 15% to 22% — 394ms — and the light is
held from 15% to 60%, 2.53s. Every keyframe below is one of those
sweep fractions times 0.88. */
--cycle: 6.4s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--_muted: color-mix(in srgb, var(--slate) 52%, transparent);
--_rule: color-mix(in srgb, var(--slate) 14%, transparent);
--_ink: color-mix(in srgb, var(--clay) 70%, var(--slate));
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
color: var(--slate);
}
.device {
width: min(320px, 86vw);
background: var(--paper);
border: 1px solid var(--oat);
border-radius: calc(16px * var(--round));
overflow: hidden;
}
.bar {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
padding: 0 14px;
border-bottom: 1px solid var(--oat);
}
.time {
font-size: 12.5px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.ind {
display: flex;
align-items: center;
gap: 7px;
}
/* Both readings share one cell, right-aligned against the light, so
the swap never shifts the dot sideways. */
.says {
display: grid;
justify-items: end;
font-size: 11.5px;
font-weight: 600;
color: var(--_ink);
}
.says span {
grid-area: 1 / 1;
opacity: 0;
}
.in-use {
animation: in-use var(--t) ease infinite;
}
.recent {
animation: recent var(--t) ease infinite;
}
@keyframes in-use {
0%,
13.2% {
opacity: 0;
}
14.4%,
19.4% {
opacity: 1;
}
20.2%,
100% {
opacity: 0;
}
}
@keyframes recent {
0%,
20.2% {
opacity: 0;
}
21.6%,
52.8% {
opacity: 1;
}
55.3%,
100% {
opacity: 0;
}
}
.light {
position: relative;
width: 9px;
height: 9px;
border-radius: 50%;
box-shadow: inset 0 0 0 1.5px var(--clay);
opacity: 0;
animation: light var(--t) infinite;
}
.fill {
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--clay);
animation: fill var(--t) infinite;
}
/* Filled while the mic is open; the moment it closes the fill drains
to leave a ring. The ring is the honest half of the design — the
audio has stopped and the light says so, but it does not leave until
a person has had time to see it. A 400ms grab that lit a dot for
400ms would be a dot nobody saw. */
@keyframes light {
0%,
13.2% {
opacity: 0;
transform: scale(0.8);
animation-timing-function: var(--ease-out);
}
15.2%,
52.8% {
opacity: 1;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
55.3%,
100% {
opacity: 0;
transform: scale(1);
}
}
@keyframes fill {
0%,
19.4% {
opacity: 1;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
22.5%,
100% {
opacity: 0;
transform: scale(0.5);
}
}
.tl {
display: grid;
grid-template-columns: auto 1fr;
column-gap: 12px;
align-items: start;
padding: clamp(14px, 4.5vw, 20px) 16px clamp(14px, 4.5vw, 18px);
}
.keys {
display: grid;
grid-template-rows: 16px 16px;
row-gap: 10px;
font-size: 11px;
color: var(--_muted);
line-height: 16px;
}
.lanes {
position: relative;
height: 64px;
clip-path: inset(-6px -1px);
}
.layer {
position: absolute;
inset: 0;
}
.dim {
opacity: 0.26;
}
/* The lit copy is revealed by the same linear clock as the head, so
the timeline only ever claims what has already happened. Linear
because this is time passing; an eased sweep would say the middle of
the second went faster than its ends. */
.lit {
clip-path: inset(0 100% 0 0);
animation: sweep var(--t) linear infinite;
}
@keyframes sweep {
0% {
clip-path: inset(0 100% 0 0);
opacity: 1;
}
88%,
92% {
clip-path: inset(0 0 0 0);
opacity: 1;
}
96%,
100% {
clip-path: inset(0 0 0 0);
opacity: 0;
}
}
.rail {
position: absolute;
left: 0;
right: 0;
height: 2px;
background: var(--_rule);
}
.r1 {
top: 7px;
}
.r2 {
top: 33px;
}
.seg {
position: absolute;
height: 8px;
border-radius: 999px;
}
.open {
top: 4px;
left: 15%;
width: 7%;
background: var(--clay);
}
.held {
top: 30px;
left: 15%;
width: 45%;
background: var(--paper);
box-shadow: inset 0 0 0 1.5px var(--clay);
}
.held::before {
content: '';
position: absolute;
inset: 0 auto 0 0;
width: calc(100% * 7 / 45);
border-radius: 999px;
background: var(--clay);
}
.note {
position: absolute;
font-size: 11px;
line-height: 16px;
color: var(--_muted);
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.n1 {
top: 0;
left: calc(22% + 6px);
padding: 0 5px;
background: var(--paper);
}
.n2 {
top: 46px;
left: 15%;
}
.head {
position: absolute;
inset: -4px 0 18px 0;
animation: head var(--t) linear infinite;
}
.head::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: -0.75px;
width: 1.5px;
border-radius: 999px;
background: var(--slate);
}
/* The head fades up over its first 96ms rather than appearing at
full ink on the seam frame; the translate stays linear from 0%. */
@keyframes head {
0% {
transform: translateX(0);
opacity: 0;
}
1.5% {
opacity: 1;
}
88%,
92% {
transform: translateX(100%);
opacity: 1;
}
96%,
100% {
transform: translateX(100%);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
/* The head and the sweep stay — they are the timeline — but slower,
and every clock stretches by the same 1.5 so the light still fills
on the frame the head reaches the open segment. The light keeps
its fade and its drain to a ring but loses the scale-in. */
.light {
animation-name: light-calm;
}
@keyframes light-calm {
0%,
13.2% {
opacity: 0;
}
15.2%,
52.8% {
opacity: 1;
}
55.3%,
100% {
opacity: 0;
}
}
.head,
.lit,
.in-use,
.recent,
.light,
.fill {
animation-duration: calc(var(--t) * 1.5);
}
}
</style>
</head>
<body>
<div
class="device"
role="img"
aria-label="A timeline where an app opens the microphone for only 0.4 seconds; the status light fills for the access, then stays on as a hollow ring reading 'Mic used recently' until at least 2.5 seconds have passed"
>
<div class="bar">
<span class="time">9:41</span>
<span class="ind">
<span class="says">
<span class="in-use">Mic in use</span>
<span class="recent">Mic used recently</span>
</span>
<span class="light"><span class="fill"></span></span>
</span>
</div>
<div class="tl" aria-hidden="true">
<div class="keys">
<span>Mic</span>
<span>Light</span>
</div>
<div class="lanes">
<div class="layer">
<span class="rail r1"></span>
<span class="rail r2"></span>
</div>
<div class="layer dim">
<span class="seg open"></span>
<span class="seg held"></span>
</div>
<div class="layer lit">
<span class="seg open"></span>
<span class="seg held"></span>
</div>
<span class="head"></span>
<div class="layer">
<span class="note n1">0.4s</span>
<span class="note n2">on ≥ 2.5s from first use</span>
</div>
</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.