Skip to content

Hover Highlight Row

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

Tables & Data GridsHTMLCSSany framework
FileSizeModified
📄 main.ts4.2 KB2 min ago
📄 styles.css1.8 KB1 hr ago
📄 index.html890 BYesterday

Copy into your project

HTML
<div class="nuda-tbl-hover">
  <table class="nuda-tbl-hover__table">
    <thead>
      <tr>
        <th class="nuda-tbl-hover__th">File</th>
        <th class="nuda-tbl-hover__th">Size</th>
        <th class="nuda-tbl-hover__th">Modified</th>
      </tr>
    </thead>
    <tbody>
      <tr class="nuda-tbl-hover__row">
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--file">
          <span class="nuda-tbl-hover__icon">📄</span> main.ts
        </td>
        <td class="nuda-tbl-hover__td">4.2 KB</td>
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--muted">2 min ago</td>
      </tr>
      <tr class="nuda-tbl-hover__row">
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--file">
          <span class="nuda-tbl-hover__icon">📄</span> styles.css
        </td>
        <td class="nuda-tbl-hover__td">1.8 KB</td>
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--muted">1 hr ago</td>
      </tr>
      <tr class="nuda-tbl-hover__row">
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--file">
          <span class="nuda-tbl-hover__icon">📄</span> index.html
        </td>
        <td class="nuda-tbl-hover__td">890 B</td>
        <td class="nuda-tbl-hover__td nuda-tbl-hover__td--muted">Yesterday</td>
      </tr>
    </tbody>
  </table>
</div>
CSS
.nuda-tbl-hover {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
  background: #141414;
}

.nuda-tbl-hover__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

.nuda-tbl-hover__th {
  padding: .5rem .75rem;
  text-align: left;
  color: #777;
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.nuda-tbl-hover__td {
  padding: .5rem .75rem;
  color: #cfcfcf;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .12s,color .12s;
}

.nuda-tbl-hover__row:last-child .nuda-tbl-hover__td {
  border-bottom: none;
}

.nuda-tbl-hover__row {
  transition: background .12s;
  cursor: default;
}

.nuda-tbl-hover__row:hover .nuda-tbl-hover__td {
  background: rgba(228,255,84,.07);
  color: #fafafa;
}

.nuda-tbl-hover__td--file {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nuda-tbl-hover__td--muted {
  color: #555;
  font-size: .72rem;
}

.nuda-tbl-hover__icon {
  font-size: .85rem;
}

How to use Hover Highlight Row

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 tables & data grids components

← Browse all NudaUI components