Pixel Keycap
A soft-touch keycap with your logo and legend, and a strip of pixels down its right edge that light up one by one until it's full, blink, and start again. It lifts on hover and presses down when clicked.
Features
- •A key you want to press — A soft-touch keycap with a dished top, soft shading and a deep shadow. It lifts a little on hover and presses down when clicked or when you press Enter or Space on it.
- •Pixels that fill up — A strip of 3 to 8 pixels down the right edge lights up one by one until it's full, holds, blinks three times and starts again. Or switch to a chase, one pixel running up the strip. A click starts the fill over.
- •Your logo and legend — Your own logo (SVG or transparent PNG) in the top-left corner, or the Dot mark, and any word in the bottom-right corner.
- •Your colours — Pixel colour with its glow, key colour (the shading follows it), legend, logo mark and background, in any CSS colour.
- •Fits anywhere — Set the size you want; in a narrower space the key shrinks to fit instead of being cut off.
- •One file, no dependencies — Plain React and CSS. The pixels pause offscreen, and stay fully lit with reduced motion.
Props API Reference
10 configurable props| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | "dot" | The legend in the bottom-right corner. |
| logo / logoSize | string / number | Dot mark / 0.2 | Your logo image, and its width as a share of the key (0.1–0.4). |
| pixels | number | 5 | Pixels in the strip (3–8). |
| pattern | "fill" | "chase" | "fill" | Fill up one by one and blink, or one pixel chasing up the strip. |
| speed | number | 180 | Milliseconds from one pixel to the next. |
| size | number | 360 | Width of the key in px; it shrinks to fit a narrower parent. |
| accentColor / keyColor | string | "#C6F432" / "#161616" | The pixels, and the key (its shading is mixed from it). |
| legendColor / logoColor | string | "#8A8A8A" / "#6F6F6F" | The legend, and the built-in Dot mark. |
| background | string | "#141414" | Behind the key; "transparent" for none. |
| className / style | string / CSSProperties | undefined | On the wrapper; it fills its parent and centres the key. |