Loading Overlay

A translucent overlay that covers its parent with a centered spinner and label while data loads, inheriting the parent radius and announced with role status.

src/registry/ui/loading-overlay.tsx/r/loading-overlay.json
Saving

Overlay

Installation#

bash
npx shadcn@latest add @minidev/loading-overlay

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/loading-overlay.json

Usage#

tsx
import { LoadingOverlay } from "@/components/ui/loading-overlay"

export function Example() {
  return (
    <LoadingOverlay label="Saving" />
  )
}

API reference#

LoadingOverlay props
PropTypeDefault
labelstring"Loading"
classNamestring-

Dependencies#

npm

React only

Built from

All alerts, toasts and empty states

Learn more