Skip to main content

Skeleton

A loading placeholder with a breathing pulse that reveals the loaded content with a blur, plus optional shimmer and wave effects.

Skeleton·loading:true

Customize

Reveal blur (px)8
Speed0.4

Installation

Add the base component with the registry command:

npx shadcn@latest add @kinetic/skeleton

Install an effect separately when you need it. Each command also installs the base skeleton.

npx shadcn@latest add @kinetic/shimmer-skeleton
npx shadcn@latest add @kinetic/wave-skeleton

Usage

Size the placeholder with utility classes. Pass loading and children to swap in the real content when it arrives.

import { Skeleton } from "@/components/kinetic/ui/skeleton";

interface ProfileNameProps {
  readonly name?: string;
}

export function ProfileName({ name }: ProfileNameProps) {
  return (
    <Skeleton loading={!name} className="h-5 w-40">
      <p className="font-medium">{name}</p>
    </Skeleton>
  );
}

Shimmer

Use ShimmerSkeleton for a soft light band that sweeps across the placeholder.

import { ShimmerSkeleton } from "@/components/kinetic/ui/shimmer-skeleton";

<ShimmerSkeleton className="h-4 w-48" />

Wave

Use WaveSkeleton for a wave that swells as it crosses the block.

import { WaveSkeleton } from "@/components/kinetic/ui/wave-skeleton";

<WaveSkeleton className="size-10 rounded-full" />

Every effect accepts the same props as Skeleton.

Still placeholder

Set pulse={false} on Skeleton for a block without any animation.

<Skeleton pulse={false} className="h-4 w-32" />

Content reveal

When loading turns false, the children fade in from a blur set by blurPx. While loading, the placeholder is hidden from assistive technology.

<Skeleton loading={isLoading} blurPx={6} className="h-24 w-full rounded-xl">
  <ArticlePreview />
</Skeleton>

Custom layers

overlay renders extra layers inside the placeholder. The shimmer and wave effects are built on it.

Motion preferences

Use speed to scale the pulse, the effects and the reveal. Reduced motion keeps the placeholder still and reveals content with a plain fade.

API Reference

Skeleton

Loading placeholder with a breathing pulse and an optional blur reveal into the loaded content.

PropTypeDefaultDescription
pulsebooleantrueFades the placeholder in and out. Set false for a still block.
overlayReact.ReactNode-Layers painted inside the placeholder, used by effects such as ShimmerSkeleton.
loading / childrenboolean / ReactNodeundefinedWhen children are provided and loading becomes false, transitions into children via blur-to-sharp reveal.
blurPx / speednumber / number8 / 0.4Configures reveal blur radius (0-16px) and animation speed scaling.

ShimmerSkeleton

Skeleton with a light band sweeping across the placeholder. Accepts the Skeleton props.

PropTypeDefaultDescription
...propsOmit<SkeletonProps, "overlay" | "pulse">-Skeleton props.

WaveSkeleton

Skeleton with a soft wave that swells as it crosses the placeholder. Accepts the Skeleton props.

PropTypeDefaultDescription
...propsOmit<SkeletonProps, "overlay" | "pulse">-Skeleton props.

Notes

Use Skeleton instead of raw animate-pulse divs, specify explicit dimensions such as size-10 or h-4 w-40, and wrap loading groups in an aria-busy='true' container.