Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Pixel Loader

ProNew

A pixel-grid loader with four patterns, a shimmering label and a running clock.

Installation

pnpm dlx shadcn@latest add @viewport/pixel-loader

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
variantVariant

The pattern the pixels light up in.

"wave"
labelstring

Status text next to the grid. Also what screen readers announce.

"Thinking"
showElapsedboolean

Count the seconds since the loader appeared.

true
gridnumber

Pixels per side of the grid.

3
sizenumber

Size of one pixel, in CSS pixels.

4
durationnumber

Seconds for one pass of the pattern.

1.2
classNamestring—

Accessibility

  • A status region that announces the label once, never the clock.
  • The pattern is CSS and freezes mid-pass under reduced motion.
  • Uses tabular numerals so the clock never shifts the layout.