Full-Screen Overlay
A copy-paste modals & overlays component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Modals & OverlaysHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-mdx-fsoverlay" role="dialog" aria-modal="true" aria-label="Full-screen overlay">
<div class="nuda-mdx-fsoverlay__blur"></div>
<div class="nuda-mdx-fsoverlay__content">
<button class="nuda-mdx-fsoverlay__close" aria-label="Close">×</button>
<div class="nuda-mdx-fsoverlay__logo">
<svg width="28" height="28" viewBox="0 0 32 32" fill="none">
<rect width="32" height="32" rx="8" fill="#e4ff54"/>
<path d="M9 16 L16 9 L23 16 L16 23 Z" fill="#0a0a0a"/>
</svg>
</div>
<p class="nuda-mdx-fsoverlay__headline">Full Coverage</p>
<p class="nuda-mdx-fsoverlay__sub">Takes over the entire viewport</p>
<nav class="nuda-mdx-fsoverlay__nav">
<a href="#" class="nuda-mdx-fsoverlay__link">Home</a>
<a href="#" class="nuda-mdx-fsoverlay__link">Work</a>
<a href="#" class="nuda-mdx-fsoverlay__link">About</a>
</nav>
</div>
</div>CSS
.nuda-mdx-fsoverlay {
position: relative;
width: 100%;
min-height: 160px;
border-radius: 12px;
overflow: hidden;
background: #0d0d0d;
display: flex;
align-items: center;
justify-content: center;
animation: _nuda-mdxFsIn .5s ease-out both;
}
.nuda-mdx-fsoverlay__blur {
position: absolute;
inset: 0;
background: radial-gradient(ellipse at 20% 50%,rgba(228,255,84,.06) 0%,transparent 70%);
}
.nuda-mdx-fsoverlay__content {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: .35rem;
padding: 1rem;
}
.nuda-mdx-fsoverlay__close {
position: absolute;
top: .6rem;
right: .8rem;
font-size: 1rem;
color: #555;
cursor: pointer;
line-height: 1;
}
.nuda-mdx-fsoverlay__logo {
margin-bottom: .1rem;
}
.nuda-mdx-fsoverlay__headline {
margin: 0;
font-size: .85rem;
font-weight: 800;
color: #fafafa;
letter-spacing: -.01em;
}
.nuda-mdx-fsoverlay__sub {
margin: 0;
font-size: .62rem;
color: #555;
}
.nuda-mdx-fsoverlay__nav {
display: flex;
gap: .75rem;
margin-top: .3rem;
}
.nuda-mdx-fsoverlay__link {
font-size: .65rem;
color: #cfcfcf;
cursor: pointer;
border-bottom: 1px solid rgba(228,255,84,.3);
padding-bottom: 1px;
}
@keyframes _nuda-mdxFsIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-mdx-fsoverlay {
animation: none;
}
}
How to use Full-Screen Overlay
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.