Effects · component · 7K

One-bit

Wraps any live content — video, an iframe, a whole form — and shows it in 1-bit (or a few gray levels) through an inline SVG filter: luma, a tiled 8×8 Bayer threshold and a discrete transfer. The content stays interactive.

Works in current Chrome, Edge, Firefox and Safari via CSS filter: url(#id); Safari can render the Bayer tile slightly soft when zoomed, and filtered video is expensive everywhere. The wrapper becomes a containing block for position: fixed children. The filter turns off in forced-colors mode.

Install

pnpm dlx shadcn@latest add @s7ui/one-bit

Example

This example also uses @s7ui/button @s7ui/checkbox @s7ui/input @s7ui/label @s7ui/native-select.

Everything inside the frame is live HTML: the wheel spins, the field takes text, the button counts.

Info

Files:
components/retro/one-bit.tsx
Uses:
@s7ui/theme
Packages:
—