Image Skeleton
A copy-paste skeletons component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
SkeletonsHTMLCSSany framework
Copy into your project
HTML
<!-- Image Skeleton -->
<div class="nuda-image-skeleton" role="status" aria-label="Loading image" aria-busy="true">
<div class="nuda-image-skeleton__box">
<svg class="nuda-image-skeleton__icon" viewBox="0 0 24 24"
width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.5">
<rect x="3" y="3" width="18" height="18" rx="2" />
<circle cx="8.5" cy="8.5" r="1.5" />
<path d="M21 15l-5-5L5 21" />
</svg>
</div>
</div>CSS
/* Image Skeleton
Image placeholder with shimmer and a centered image icon.
Customize: --img-skel-base, --img-skel-highlight, --img-skel-ratio */
.nuda-image-skeleton {
--img-skel-base: rgba(255, 255, 255, 0.06);
--img-skel-highlight: rgba(255, 255, 255, 0.1);
--img-skel-ratio: 16 / 10;
width: 100%;
}
.nuda-image-skeleton__box {
width: 100%;
aspect-ratio: var(--img-skel-ratio);
border-radius: 8px;
background: linear-gradient(
90deg,
var(--img-skel-base) 25%,
var(--img-skel-highlight) 50%,
var(--img-skel-base) 75%
);
background-size: 200% 100%;
animation: nuda-img-shimmer 1.5s ease-in-out infinite;
display: flex;
align-items: center;
justify-content: center;
}
.nuda-image-skeleton__icon {
color: rgba(255, 255, 255, 0.15);
}
@keyframes nuda-img-shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
.nuda-image-skeleton__box {
animation: none;
background: var(--img-skel-base);
}
}How to use Image Skeleton
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.