Reveal Content
A copy-paste cards & hover component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Cards & HoverHTMLCSSany framework
Copy into your project
HTML
<!-- Reveal Content — overlay content slides up on hover -->
<div class="nuda-reveal-content" tabindex="0">
<div class="nuda-reveal-content__front">Reveal Content</div>
<div class="nuda-reveal-content__overlay">
<strong>Details</strong>
<span>Overlay slides up on hover</span>
</div>
</div>CSS
/* ── Reveal Content ──────────────────────────────────────────
Overlay panel slides up from the bottom on hover/focus.
Customize:
--nuda-rv-overlay : overlay background
--nuda-rv-speed : slide duration
──────────────────────────────────────────────────────────── */
.nuda-reveal-content {
--nuda-rv-overlay: rgba(9, 9, 11, 0.92);
--nuda-rv-speed: 0.4s;
position: relative;
width: 280px;
height: 190px;
border-radius: 16px;
overflow: hidden;
background: linear-gradient(135deg, #a3b800, #09090b);
cursor: pointer;
}
.nuda-reveal-content:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 3px;
}
.nuda-reveal-content__front {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: #fafafa;
font-weight: 700;
font-size: 1.1rem;
}
.nuda-reveal-content__overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
padding: 20px;
text-align: center;
background: var(--nuda-rv-overlay);
color: #fafafa;
transform: translateY(100%);
transition: transform var(--nuda-rv-speed) cubic-bezier(0.22, 1, 0.36, 1);
}
.nuda-reveal-content:hover .nuda-reveal-content__overlay,
.nuda-reveal-content:focus-visible .nuda-reveal-content__overlay {
transform: translateY(0);
}
.nuda-reveal-content__overlay strong { color: #e4ff54; font-size: 1rem; }
.nuda-reveal-content__overlay span { font-size: 0.82rem; opacity: 0.75; }
/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.nuda-reveal-content__overlay {
transition: none;
transform: none;
opacity: 0;
}
.nuda-reveal-content:hover .nuda-reveal-content__overlay,
.nuda-reveal-content:focus-visible .nuda-reveal-content__overlay {
opacity: 1;
}
}How to use Reveal Content
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.