Shuffle Loader

A row of white blocks that continuously swap places with a lift-drop animation.

Shuffle Loader is a row of blocks that perpetually trade places: one lifts up, slides over its neighbors, and drops into a new slot. The block count, speed, and timing curve are props. Built with Framer Motion and Tailwind CSS. A more interesting waiting state than a spinner for page transitions, AI generation pauses, and background job indicators.

Installation

Usage

import { ShuffleLoader } from "@/components/ui/shuffle-loader";
<div className="grid place-content-center bg-neutral-950 p-8">
  <ShuffleLoader />
</div>

Props

PropTypeDefaultDescription
countnumber5Number of blocks in the row.
sizenumber32Width/height of each block in pixels. Also drives the lift/drop distance.
classNamestring—Classes for the outer flex container.