Skip to content

Skeleton

Placeholder loading shape with a cursor-tinted travelling shimmer. A bright band sweeps across on a rAF loop with a hint of pastelColour mapped to cursor position.

  • requestAnimationFrame
  • Linear Gradient
  • pastelColour

skeleton

Move your cursor to tint the shimmer.

Usage

Drop it in

import
import { Skeleton } from "@/app/lib/components/skeleton";
example 1
<Skeleton width={200} height={16} />
<Skeleton width={40} height={40} rounded="rounded-full" />

API

Props

PropTypeDefault
width

Width — number (px) or CSS string

string | number—
height

Height — number (px) or CSS string

string | number16
rounded

Tailwind border-radius class. Default: "rounded-lg"

string"rounded-lg"
className

Additional class names

string""

Read from the component's source at build time. * required.

Accessibility

Works with

Cursor
Reacts to where the pointer is, not just whether it's over the element.
Touch
Follows your finger while it's down, then settles a moment after you lift.
Keyboard
Focus lights it up the way the cursor does. Every action has a key.
Reduced motion
Nothing moves or springs. Colour still answers, without drifting.