Browse components
Skeleton Overlay
A card-shaped skeleton overlay for loading dashboards, forms, and content panels.
Add to your project
Pick the way you like to build.
Let your AI assistant add it
Copy this prompt and paste it into the AI tool building your site.
# Integrate this UI component
Add this component to my project.
1. Install any missing dependencies.
2. Make sure Tailwind CSS is set up and scans the new file.
3. Prefer passing props over editing the component source — changing the component itself may break it.
4. Adjust colors, size, and layout via props or wrapper classes to match my project. You know my codebase better than this snippet does.
## Component source
```tsx
"use client";
import { useEffect } from "react";
type SkeletonOverlayProps = {
open: boolean;
onOpenChange?: (open: boolean) => void;
label?: string;
className?: string;
};
export default function SkeletonOverlay({
open,
onOpenChange,
label = "Loading",
className = "",
}: SkeletonOverlayProps) {
useEffect(() => {
if (!open) return;
const overflow = document.body.style.overflow;
const closeOnEscape = (event: KeyboardEvent) => {
if (event.key === "Escape") onOpenChange?.(false);
};
document.body.style.overflow = "hidden";
window.addEventListener("keydown", closeOnEscape);
return () => {
document.body.style.overflow = overflow;
window.removeEventListener("keydown", closeOnEscape);
};
}, [onOpenChange, open]);
if (!open) return null;
return (
<div
role="status"
aria-live="polite"
className={[
"fixed inset-0 z-50 grid place-items-center bg-slate-950/50 p-6 backdrop-blur-sm",
className,
]
.filter(Boolean)
.join(" ")}
>
<div
className="w-full max-w-sm rounded-2xl bg-white p-5 shadow-2xl"
aria-hidden
>
<div className="h-4 w-2/5 animate-pulse rounded bg-slate-200" />
<div className="mt-5 h-24 animate-pulse rounded-xl bg-slate-100" />
<div className="mt-5 space-y-3">
<div className="h-3 w-full animate-pulse rounded bg-slate-100" />
<div className="h-3 w-4/5 animate-pulse rounded bg-slate-100" />
<div className="h-3 w-3/5 animate-pulse rounded bg-slate-100" />
</div>
</div>
<span className="sr-only">{label}</span>
</div>
);
}
```
Works with your AI tools
* Compatible with most projects that use the default React/Next.js framework.
Built With
Props
| Prop | Type | Description |
|---|---|---|
open* | boolean | Whether the full-page overlay is visible. |
onOpenChange | (open: boolean) => void | Called when Escape closes the overlay. |
label | string | Screen-reader loading message. |
className | string | Override the overlay position, size, or colors. |
More Overlay Loaders Components

A centered spinner overlay for blocking a page or panel while content loads.

A light three-dot loading overlay with staggered motion.

Five staggered bars that create a compact equalizer-style loading overlay.