Skip to content

Selectable Rows

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

Tables & Data GridsHTMLCSSany framework
UserPlan
luna@dev.ioPro
marco@ui.coFree
sasha@co.dePro

Copy into your project

HTML
<div class="nuda-tbl-select">
  <table class="nuda-tbl-select__table">
    <thead>
      <tr>
        <th class="nuda-tbl-select__th nuda-tbl-select__th--check">
          <span class="nuda-tbl-select__chk nuda-tbl-select__chk--all"></span>
        </th>
        <th class="nuda-tbl-select__th">User</th>
        <th class="nuda-tbl-select__th">Plan</th>
      </tr>
    </thead>
    <tbody>
      <tr class="nuda-tbl-select__row nuda-tbl-select__row--checked">
        <td class="nuda-tbl-select__td">
          <span class="nuda-tbl-select__chk nuda-tbl-select__chk--on"></span>
        </td>
        <td class="nuda-tbl-select__td">luna@dev.io</td>
        <td class="nuda-tbl-select__td">Pro</td>
      </tr>
      <tr class="nuda-tbl-select__row">
        <td class="nuda-tbl-select__td">
          <span class="nuda-tbl-select__chk"></span>
        </td>
        <td class="nuda-tbl-select__td">marco@ui.co</td>
        <td class="nuda-tbl-select__td">Free</td>
      </tr>
      <tr class="nuda-tbl-select__row nuda-tbl-select__row--checked">
        <td class="nuda-tbl-select__td">
          <span class="nuda-tbl-select__chk nuda-tbl-select__chk--on"></span>
        </td>
        <td class="nuda-tbl-select__td">sasha@co.de</td>
        <td class="nuda-tbl-select__td">Pro</td>
      </tr>
    </tbody>
  </table>
</div>
CSS
.nuda-tbl-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  overflow: hidden;
  background: #141414;
}

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

.nuda-tbl-select__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-select__th--check {
  width: 36px;
}

.nuda-tbl-select__td {
  padding: .42rem .75rem;
  color: #cfcfcf;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.nuda-tbl-select__row:last-child .nuda-tbl-select__td {
  border-bottom: none;
}

.nuda-tbl-select__row--checked {
  background: rgba(228,255,84,.05);
}

.nuda-tbl-select__row--checked .nuda-tbl-select__td {
  color: #fafafa;
}

.nuda-tbl-select__chk {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,.25);
  background: transparent;
  vertical-align: middle;
  position: relative;
  transition: background .15s,border-color .15s;
}

.nuda-tbl-select__chk--on {
  background: #e4ff54;
  border-color: #e4ff54;
}

.nuda-tbl-select__chk--on::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: 2px solid #141414;
  border-top: none;
  border-left: none;
  transform: rotate(42deg);
}

.nuda-tbl-select__chk--all {
  border-style: dashed;
  opacity: .5;
}

How to use Selectable Rows

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