Inline Edit Cell
A copy-paste tables & data grids component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Tables & Data GridsHTMLCSSany framework
| Field | Value | Action |
|---|---|---|
| Display name | ||
| Username | @alexj |
Copy into your project
HTML
<div class="nuda-tbl-edit">
<table class="nuda-tbl-edit__table">
<thead>
<tr>
<th class="nuda-tbl-edit__th">Field</th>
<th class="nuda-tbl-edit__th">Value</th>
<th class="nuda-tbl-edit__th">Action</th>
</tr>
</thead>
<tbody>
<!-- Active editing row -->
<tr class="nuda-tbl-edit__row">
<td class="nuda-tbl-edit__td nuda-tbl-edit__td--label">Display name</td>
<td class="nuda-tbl-edit__td">
<div class="nuda-tbl-edit__field nuda-tbl-edit__field--editing">
<input class="nuda-tbl-edit__input" value="Alex Johnson" />
</div>
</td>
<td class="nuda-tbl-edit__td">
<button class="nuda-tbl-edit__save">Save</button>
</td>
</tr>
<!-- Read-only row -->
<tr class="nuda-tbl-edit__row">
<td class="nuda-tbl-edit__td nuda-tbl-edit__td--label">Username</td>
<td class="nuda-tbl-edit__td">
<div class="nuda-tbl-edit__field">
<span class="nuda-tbl-edit__value">@alexj</span>
</div>
</td>
<td class="nuda-tbl-edit__td">
<button class="nuda-tbl-edit__edit">Edit</button>
</td>
</tr>
</tbody>
</table>
</div>CSS
.nuda-tbl-edit {
width: 100%;
border-radius: 10px;
border: 1px solid rgba(255,255,255,.1);
overflow: hidden;
background: #141414;
}
.nuda-tbl-edit__table {
width: 100%;
border-collapse: collapse;
font-size: .78rem;
}
.nuda-tbl-edit__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-edit__td {
padding: .4rem .75rem;
color: #cfcfcf;
border-bottom: 1px solid rgba(255,255,255,.05);
vertical-align: middle;
}
.nuda-tbl-edit__row:last-child .nuda-tbl-edit__td {
border-bottom: none;
}
.nuda-tbl-edit__td--label {
color: #777;
font-size: .72rem;
}
.nuda-tbl-edit__field {
display: flex;
align-items: center;
}
.nuda-tbl-edit__field--editing {
background: rgba(228,255,84,.05);
border-radius: 5px;
border: 1px solid rgba(228,255,84,.3);
overflow: hidden;
}
.nuda-tbl-edit__input {
background: transparent;
border: none;
outline: none;
color: #fafafa;
font-size: .78rem;
padding: 4px 8px;
width: 100%;
font-family: inherit;
}
.nuda-tbl-edit__value {
color: #cfcfcf;
}
.nuda-tbl-edit__save {
padding: 3px 10px;
border-radius: 5px;
background: #e4ff54;
border: none;
color: #141414;
font-size: .68rem;
font-weight: 700;
cursor: pointer;
transition: opacity .12s;
}
.nuda-tbl-edit__save:hover {
opacity: .85;
}
.nuda-tbl-edit__edit {
padding: 3px 10px;
border-radius: 5px;
background: transparent;
border: 1px solid rgba(255,255,255,.15);
color: #777;
font-size: .68rem;
cursor: pointer;
transition: border-color .12s,color .12s;
}
.nuda-tbl-edit__edit:hover {
border-color: rgba(255,255,255,.3);
color: #cfcfcf;
}
How to use Inline Edit Cell
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.