Skip to content

Message Skeleton

A copy-paste skeletons component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

SkeletonsHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-skmsg">
  <span class="nuda-skmsg__avatar"></span>
  <div class="nuda-skmsg__body">
    <span style="width:80%"></span>
    <span style="width:60%"></span>
    <span style="width:40%"></span>
  </div>
</div>
CSS
.nuda-skmsg {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  width: 100%;
  max-width: 280px;
}

.nuda-skmsg__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.1),rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: _skShim 1.6s linear infinite;
}

.nuda-skmsg__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nuda-skmsg__body span {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.1),rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: _skShim 1.6s linear infinite;
}

.nuda-skmsg__body span:nth-child(2) {
  animation-delay: .1s;
}

.nuda-skmsg__body span:nth-child(3) {
  animation-delay: .2s;
  height: 8px;
}

@keyframes _skShim {
  to {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-skmsg__avatar,.nuda-skmsg__body span {
    animation: none;
  }
}

How to use Message 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.

More skeletons components

← Browse all NudaUI components