Componentfeedback0.54 KB gzipZero dependencies

LoadingOverlay

Absolute/fixed veil with backdrop blur and spinner; fade in/out with opacity transition.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add loading-overlay

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { LoadingOverlay } from "@/components/ui/loading-overlay" <LoadingOverlay active={true} label="Loading data" />

Source code

loading-overlay.tsx + 2 helpers

Zero third-party dependencies (3 local files shown in tabs below).

tsxloading-overlay.tsx56 lines
"use client"; import * as React from "react";import { lockBodyScroll } from "./lib/focus-trap";import { cn } from "./lib/utils"; export type LoadingOverlayProps = {  active: boolean;  label?: string;} & React.HTMLAttributes<HTMLElement>; export function LoadingOverlay({ active, label, ...props }: LoadingOverlayProps) {  React.useEffect(() => {    if (!active) return;    return lockBodyScroll();  }, [active]);   return (

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { LoadingOverlay } from "@/components/ui/loading-overlay"; <LoadingOverlay />
PropTypeDescription
activebooleanWhether the overlay is active.
labelstringOptional label text displayed above spinner.