Simple reusable overlay for dimming/blurring the page behind menus.
Copy the full block below to use this component with its imports.
--- import { BackdropMask } from 'astro-component-kit'; --- <BackdropBlurMask>Content</BackdropBlurMask>
If you are not using the npm package, create a new file src/components/lib/BackdropMask.astro and paste the following code:
src/components/lib/BackdropMask.astro
--- --- <div class="mask"></div> <style> .mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 500; pointer-events: none; } </style>
BackdropMask.astro