Overlays loadingoverlayfullscreen
Page Loader Overlay
Blocking overlay used during initial page loads or heavy transitions.
Preview
Usage
Copy the full block below to use this component with its imports.
astro
---
import { PageLoaderOverlay } from 'astro-component-kit';
---
<LoadingOverlayFull>Content</LoadingOverlayFull> ---
import { PageLoaderOverlay } from 'astro-component-kit';
---
<LoadingOverlayFull>Content</LoadingOverlayFull> Manual Installation
If you are not using the npm package, create a new file src/components/lib/PageLoaderOverlay.astro and paste the following code:
astro
---
---
<div class="load-overlay">
<div class="spinner"></div>
</div>
<style>
.load-overlay { position: fixed; inset: 0; background: #080b14; z-index: 9999; display: grid; place-items: center; }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(99,102,241,0.1); border-top-color: #6366f1; border-radius: 50%; animation: spin 0.8s infinite linear; }
@keyframes spin { to { transform: rotate(360deg); } }
</style> ---
---
<div class="load-overlay">
<div class="spinner"></div>
</div>
<style>
.load-overlay { position: fixed; inset: 0; background: #080b14; z-index: 9999; display: grid; place-items: center; }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(99,102,241,0.1); border-top-color: #6366f1; border-radius: 50%; animation: spin 0.8s infinite linear; }
@keyframes spin { to { transform: rotate(360deg); } }
</style>
Quick Info
- Category
- Overlays
- Filename
PageLoaderOverlay.astro- Dependencies
- None — pure Astro + CSS
- Tags
- loadingoverlayfullscreen