Page Loader
A full-page overlay loading spinner. Use during route transitions, initial authentication checks, or while critical data is being fetched before the page can render.
Import
import { PageLoader } from "@phpcreation/frontend-components-react-nextjs-bundle/components/PageLoader";Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
isDark | boolean | — | false | Use dark background overlay instead of light |
Usage
import { PageLoader } from "@phpcreation/frontend-components-react-nextjs-bundle/components/PageLoader";
export default function DashboardPage() {
const { loading } = useAuth();
if (loading) return <PageLoader />;
return <Dashboard />;
}
// Dark overlay variant
<PageLoader isDark />Related
Last updated on