Skeleton
A loading placeholder with a breathing pulse that reveals the loaded content with a blur, plus optional shimmer and wave effects.
Customize
Installation
Add the base component with the registry command:
npx shadcn@latest add @kinetic/skeletonInstall 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-skeletonUsage
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.
| Prop | Type | Default | Description |
|---|---|---|---|
pulse | boolean | true | Fades the placeholder in and out. Set false for a still block. |
overlay | React.ReactNode | - | Layers painted inside the placeholder, used by effects such as ShimmerSkeleton. |
loading / children | boolean / ReactNode | undefined | When children are provided and loading becomes false, transitions into children via blur-to-sharp reveal. |
blurPx / speed | number / number | 8 / 0.4 | Configures reveal blur radius (0-16px) and animation speed scaling. |
ShimmerSkeleton
Skeleton with a light band sweeping across the placeholder. Accepts the Skeleton props.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Omit<SkeletonProps, "overlay" | "pulse"> | - | Skeleton props. |
WaveSkeleton
Skeleton with a soft wave that swells as it crosses the placeholder. Accepts the Skeleton props.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Omit<SkeletonProps, "overlay" | "pulse"> | - | Skeleton props. |