Leistung
HinweisBildrate: im Mittel 60 fps, p5 59.5 · Lange Aufgaben: 0 Aufgaben, insgesamt 0 ms, längste 0 ms · Quelltext gzip 5.3 KB · Zur Laufzeit 153 KB
Wake sliderMITEingabeBencho
Eingabe-React-Komponente von Lorenzo Cabra. Unverändert aus Bencho unter der MIT-Lizenz übernommen und hier live gezeigt.
Qualitaetsbericht
Note und Punktzahl stammen aus automatischen Prüfungen beim Build oder Test. Wurde eine Prüfung nicht ausgeführt, steht dort Nicht geprüft — Zahlen werden nie erfunden.
Bildrate: im Mittel 60 fps, p5 59.5 · Lange Aufgaben: 0 Aufgaben, insgesamt 0 ms, längste 0 ms · Quelltext gzip 5.3 KB · Zur Laufzeit 153 KB
Probleme 0 · Screenreader: Bestanden
Keine dauerhafte Bewegung
Kein Ueberlauf
Bildrate und lange Aufgaben wurden in headless Chromium mit Software-WebGL gemessen. Sie eignen sich nur zum Vergleich zwischen Komponenten auf dieser Website und stehen nicht für echte Geräte.
Nicht zutreffend: in Ruhe keine sichtbare Animation. Animationen, die beim Zeigen ausgelöst werden, wurden nicht geprüft.
Keine axe-core-Verstöße.

Geprueft am 15. Nov. 2026 · Die Zahlen stammen aus einem automatischen Skript, nicht aus handgeschriebenen Beispielen.
In Originalgröße dargestellt.
Die Kopie beginnt mit dem Lizenzhinweis. Behalte ihn, wenn du den Code nutzt.
<div id="root"></div>:root{--bg:#f6f4f0;--ink:#17181a;--background:40 20% 96%;--foreground:24 10% 8%;--card:0 0% 100%}html,body{min-height:100%;margin:0;background:var(--bg);color:var(--ink)}html,body{height:100%;overflow:hidden}body{display:grid;place-items:center}#root{display:grid;place-items:center;max-width:100%;max-height:100%;box-sizing:border-box;padding:16px;color:hsl(var(--foreground))}#root.full{width:100%;height:100%;padding:0}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-play-state:paused!important;transition-duration:0s!important}}
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
/* ── Bencho tokens ─────────────────────────────────────────
The custom properties the free blocks read, at the values
bencho.dev draws them with. Light by default; dark under
[data-theme="dark"] on any ancestor, or automatically with
the system setting unless [data-theme="light"] says otherwise.
Map these to your own theme rather than keeping two: a block
only ever reads the names, never the values. */
:root {
--font-ui: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
--bg: #ffffff;
--board: #ffffff;
--card: #f7f7f6;
--surface: #f7f7f6;
--surface-2: #f1f1f0;
--surface-3: #ecebe7;
--ink: #17181a;
--ink-rgb: 23, 24, 26;
--ink-2: #3c3b37;
--ink-3: #5c5b56;
--ink-4: #6f6e68;
--ink-5: #85847e;
--on-ink: #ffffff;
--on-ink-rgb: 255, 255, 255;
--slab: #17181a;
--on-slab: #ffffff;
--slab-dark: #0e0f11;
--fill-slab: #ffffff;
--fill-on: #17181a;
--fill-on-rgb: 23, 24, 26;
--pane: var(--fill-slab);
--pane-edge: rgba(23, 24, 26, 0.08);
--pane-thumb: rgba(23, 24, 26, 0.07);
--inlay: rgba(255, 255, 255, 0.55);
--inlay-hi: rgba(23, 24, 26, 0.09);
--elev-rgb: 255, 255, 255;
--glass-rgb: 255, 255, 255;
--shadow-rgb: 23, 24, 26;
--wash: 0.06;
--pick: #0d99ff;
--signal: #2231dd;
--focus: #2231dd;
--ok: #15803d;
--ember: #b8431c;
color-scheme: light;
}
[data-theme="dark"] {
--bg: #000000;
--board: #1a1a1a;
--card: #0a0a0a;
--surface: #0f0f0f;
--surface-2: #181818;
--surface-3: #202020;
--ink: #ffffff;
--ink-rgb: 255, 255, 255;
--ink-2: #b4b4b4;
--ink-3: #9a9a9a;
--ink-4: #828282;
--ink-5: #6b6b6b;
--on-ink: #000000;
--on-ink-rgb: 0, 0, 0;
--slab: #1a1a1a;
--on-slab: #ffffff;
--slab-dark: #262626;
--fill-slab: #262626;
--fill-on: #ffffff;
--fill-on-rgb: 255, 255, 255;
--pane-edge: rgba(255, 255, 255, 0.08);
--pane-thumb: rgba(255, 255, 255, 0.07);
--inlay: rgba(255, 255, 255, 0.1);
--inlay-hi: rgba(255, 255, 255, 0.09);
--elev-rgb: 32, 32, 32;
--shadow-rgb: 0, 0, 0;
--wash: 0.09;
--pick: #3aa9ff;
--ok: #34d17a;
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #000000;
--board: #1a1a1a;
--card: #0a0a0a;
--surface: #0f0f0f;
--surface-2: #181818;
--surface-3: #202020;
--ink: #ffffff;
--ink-rgb: 255, 255, 255;
--ink-2: #b4b4b4;
--ink-3: #9a9a9a;
--ink-4: #828282;
--ink-5: #6b6b6b;
--on-ink: #000000;
--on-ink-rgb: 0, 0, 0;
--slab: #1a1a1a;
--on-slab: #ffffff;
--slab-dark: #262626;
--fill-slab: #262626;
--fill-on: #ffffff;
--fill-on-rgb: 255, 255, 255;
--pane-edge: rgba(255, 255, 255, 0.08);
--pane-thumb: rgba(255, 255, 255, 0.07);
--inlay: rgba(255, 255, 255, 0.1);
--inlay-hi: rgba(255, 255, 255, 0.09);
--elev-rgb: 32, 32, 32;
--shadow-rgb: 0, 0, 0;
--wash: 0.09;
--pick: #3aa9ff;
--ok: #34d17a;
color-scheme: dark;
}
}
/* WakeSlider.css */
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
/* ══ Wake slider ══════════════════════════════════════════
lab/WakeSlider.tsx. Thin bars, the reading beside them. The bars
are data marks, so they take the ink strengths: ink when lit,
faint after the value. Heights are written by the component */
.wks {
display: flex;
align-items: center;
gap: 16px;
padding: 16px;
color: var(--fill-on, #17181a);}
.wks-track {
display: flex;
align-items: center;
gap: 4px;
cursor: ew-resize;
touch-action: none;
user-select: none;
-webkit-user-select: none;
-webkit-tap-highlight-color: transparent;
border-radius: 6px;}
.wks-track:focus-visible { outline: 2px solid #2231dd; outline-offset: 6px; }
.wks-bar {
flex: none;
width: 3px;
border-radius: 3px;
background: color-mix(in srgb, var(--fill-on, #17181a) 32%, var(--fill-slab, #fff));
transform-origin: 50% 50%;
transition: background-color 160ms ease;}
.wks-bar[data-on] { background: var(--fill-on, #17181a); }
.wks-value {
min-width: 3ch;
font-size: 14px;
font-weight: 500;
letter-spacing: -0.01em;
font-variant-numeric: tabular-nums;
color: color-mix(in srgb, var(--fill-on, #17181a) 72%, var(--fill-slab, #fff));}
// bencho source (MIT). npm i motion react · Tailwind CSS v4
// ── blocks/wake-slider/WakeSlider.tsx (https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/wake-slider/WakeSlider.tsx)
/*
MIT License
Copyright (c) 2026 Lorenzo Cabra
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Not covered by this licence: the Bencho name and the goat mark, and the
photographs shown on bencho.dev (none are included here). Third-party
material keeps its own licence; see THIRD_PARTY.md.
Icon substitution (this copy only): lucide-react (ISC) was replaced with @tabler/icons-react (MIT).
Sample photographs were replaced with Incidental AI assets. The Bencho name and goat mark are not licensed for marketing use.
*/
import { useEffect, useRef, useState } from "react";
/* ══ Wake slider ══════════════════════════════════════════
A range with no thumb: a row of thin bars, solid up to the
value and faint after it, with the reading beside them. Drag
anywhere along it. Drag slowly and the bars simply fill; drag
fast and every bar the value sweeps past springs up, taller the
faster you went, and settles back — a wake left behind the hand.
── EACH BAR HOLDS A LITTLE ENERGY ──────────────────────
When the value crosses a bar, that bar takes energy from the
speed of the drag. Every frame all of it decays at the same
rate, so the bars crossed longest ago have fallen furthest: the
tallest ones are always at the hand and the run tails off
behind it. That falloff IS the wake; nothing draws it.
── WRITTEN, NOT RENDERED ───────────────────────────────
The heights change every frame, so they go straight onto each
bar's transform from a ref. React renders when the value
changes, which is what the reading and the colours need, and
the loop runs only while some bar still has energy. */
const H = 20; // a bar at rest, px
const GAP = 4; // bar pitch minus its width
const BAR = 3;
const clamp = (v: number, a: number, b: number) => Math.min(b, Math.max(a, v));
export function WakeSlider({
/* how many bars make the track */
bars = 36,
/* how high the wake rises, 0..100 */
wake = 60,
}: {
bars?: number;
wake?: number;
} = {}) {
const n = Math.round(clamp(bars, 12, 64));
const [value, setValue] = useState(50);
const track = useRef<HTMLDivElement | null>(null);
const els = useRef<(HTMLSpanElement | null)[]>([]);
const st = useRef({
energy: new Float32Array(n),
down: false,
lastX: 0,
lastT: 0,
speed: 0,
raf: 0,
at: 0.5, // the value as a fraction, without React in the way
lastBar: -1,
});
const knob = useRef(wake);
knob.current = wake;
/* a new bar count is a new row */
useEffect(() => {
st.current.energy = new Float32Array(n);
}, [n]);
const loop = () => {
const s = st.current;
if (s.raf) return;
let prev = performance.now();
const run = (now: number) => {
const dt = Math.min(0.05, (now - prev) / 1000);
prev = now;
let live = false;
const fall = Math.exp(-dt * 6.5);
for (let i = 0; i < s.energy.length; i++) {
s.energy[i] *= fall;
if (s.energy[i] < 0.002) s.energy[i] = 0;
else live = true;
const b = els.current[i];
/* up to 2.6 times as tall at the very top of the knob */
if (b) b.style.transform = `scaleY(${(1 + s.energy[i] * 1.6).toFixed(3)})`;
}
s.raf = live || s.down ? requestAnimationFrame(run) : 0;
};
s.raf = requestAnimationFrame(run);
};
useEffect(() => () => cancelAnimationFrame(st.current.raf), []);
/* move the value to a fraction, waking every bar it passes */
const to = (f: number, speed: number) => {
const s = st.current;
f = clamp(f, 0, 1);
const from = s.at;
s.at = f;
const a = Math.round(from * (n - 1)), b = Math.round(f * (n - 1));
/* how hard: the drag's speed in bars per second, through a
curve that saturates, scaled by the knob */
const push = (1 - Math.exp(-speed / 900)) * (knob.current / 60);
const lo = Math.min(a, b), hi = Math.max(a, b);
for (let i = lo; i <= hi; i++) s.energy[i] = Math.max(s.energy[i], push);
if (b !== s.lastBar) {
s.lastBar = b;
}
setValue(Math.round(f * 100));
loop();
};
const frac = (clientX: number) => {
const r = track.current!.getBoundingClientRect();
return (clientX - r.left) / r.width;
};
const lit = Math.round((value / 100) * (n - 1));
return (
<div className="wks">
<div
ref={track}
className="wks-track"
role="slider"
tabIndex={0}
aria-label="Value"
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={value}
style={{ width: n * (BAR + GAP) - GAP, height: H * 2.6 }}
onPointerDown={(e) => {
const s = st.current;
try { e.currentTarget.setPointerCapture(e.pointerId); } catch { /* a scripted pointer */ }
s.down = true;
s.lastX = e.clientX;
s.lastT = performance.now();
s.speed = 0;
to(frac(e.clientX), 0);
}}
onPointerMove={(e) => {
const s = st.current;
if (!s.down) return;
const now = performance.now();
const dt = Math.max(0.008, (now - s.lastT) / 1000);
/* speed in px per second, smoothed so one jittery frame
cannot fake a fling */
const v = Math.abs(e.clientX - s.lastX) / dt;
s.speed = s.speed * 0.5 + v * 0.5;
s.lastX = e.clientX;
s.lastT = now;
to(frac(e.clientX), s.speed);
}}
onPointerUp={(e) => {
st.current.down = false;
try { e.currentTarget.releasePointerCapture(e.pointerId); } catch { /* never captured */ }
}}
onPointerCancel={() => { st.current.down = false; }}
onKeyDown={(e) => {
const step = e.shiftKey ? 10 : 1;
let next: number | null = null;
if (e.key === "ArrowRight" || e.key === "ArrowUp") next = value + step;
if (e.key === "ArrowLeft" || e.key === "ArrowDown") next = value - step;
if (e.key === "Home") next = 0;
if (e.key === "End") next = 100;
if (next === null) return;
e.preventDefault();
/* a key press is a small, quick step: a little wake */
to(clamp(next, 0, 100) / 100, 600);
}}
>
{Array.from({ length: n }, (_, i) => (
<span
key={i}
ref={(b) => { els.current[i] = b; }}
className="wks-bar"
data-on={(value > 0 && i <= lit) || undefined}
style={{ height: H }}
/>
))}
</div>
<span className="wks-value">{value}</span>
</div>
);
}Regler · HTML · CSS · JS
Bearbeite den Code und stimme ihn mit den Reglern ab. Die Vorschau aktualisiert sich beim Tippen.

Diese Komponente läuft aus einem fertigen Bundle, daher ist ihr Skript hier schreibgeschützt. Bearbeite HTML und CSS; der vollständige Quellcode steht im Tab Code.
Bearbeite jede Komponente live, stimme sie mit Reglern ab, lade den vollständigen Quellcode herunter und kopiere die erweiterten Prompts.
49 $ einmaligPlatzhalterpreis
Testmodus: Es wird nichts wirklich bezahlt.
Kostenlos: Vorschau, Kopier-Buttons und Lektionsnotizen.
Ein sichtbares Label, ein ruhiger Rahmen und ein klarer Fokus führen beim Tippen.
Suche, Anmeldung und kurze Textfelder.
Passe Höhe, Rahmenfarbe und Fokus-Glühen an.
Füge die Komponente „Wake slider“ aus Bencho (github.com/cabralorenzo/bencho) (MIT) in meine React- und Tailwind-CSS-App ein. Quelldatei: https://github.com/cabralorenzo/bencho/blob/c65992417427bb09e661674ffa800bef29adef49/blocks/wake-slider/WakeSlider.tsx. Ein sichtbares Label, ein ruhiger Rahmen und ein klarer Fokus führen beim Tippen. Einsatz: Suche, Anmeldung und kurze Textfelder. Einstellbare Werte: Passe Höhe, Rahmenfarbe und Fokus-Glühen an. Unterstütze helles und dunkles Theme und beachte prefers-reduced-motion. Behalte den MIT-Lizenzhinweis bei.
Ein längerer Prompt mit Schritten für Feinabstimmung, Barrierefreiheit und Einbindung.