Inline-edit tabledata-grid-inline-edit
Use in Plus UI
npx shadcn@latest add https://blocks.plusui.com/r/data-grid-inline-edit.jsonData-grid · 3 variants
← → to step through · + on a thumbnail to compare side by side (up to 3)
/preview/data-grid-inline-edit
Open ↗Default content
{
"eyebrow": "Marrow & Pine · Inventory",
"title": "Autumn stock sheet",
"description": "Prices, stock and reorder points for the autumn range. Changes save as you go and show on the shop within a minute.",
"actions": [
{
"label": "Add product",
"href": "#add-product",
"variant": "primary"
}
],
"currency": "GBP",
"columns": [
{
"key": "sku",
"label": "SKU",
"kind": "mono"
},
{
"key": "product",
"label": "Product",
"kind": "strong"
},
{
"key": "colour",
"label": "Colour",
"kind": "text",
"editable": true
},
{
"key": "price",
"label": "Price",
"kind": "money",
"editable": true,
"min": 1,
"max": 2000
},
{
"key": "stock",
"label": "In stock",
"kind": "number",
"editable": true,
"min": 0,
"max": 9999
},
{
"key": "reorder",
"label": "Reorder at",
"kind": "number",
"editable": true,
"min": 0,
"max": 500
},
{
"key": "status",
"label": "Status",
"kind": "status",
"editable": true
}
],
"statuses": [
{
"value": "live",
"label": "Live",
"tone": "success"
},
{
"value": "low",
"label": "Low stock",
"tone": "warning"
},
{
"value": "preorder",
"label": "Pre-order",
"tone": "progress"
},
{
"value": "hidden",
"label": "Hidden",
"tone": "neutral"
}
],
"rows": [
{
"id": "mp1",
"cells": {
"sku": "MP-WL-014",
"product": "Waxed linen field jacket",
"colour": "Moss",
"price": 168,
"stock": 42,
"reorder": 12,
"status": "live"
}
},
{
"id": "mp2",
"cells": {
"sku": "MP-KN-201",
"product": "Lambswool rib jumper",
"colour": "Oat",
"price": 95,
"stock": 8,
"reorder": 10,
"status": "low"
}
},
{
"id": "mp3",
"cells": {
"sku": "MP-KN-202",
"product": "Lambswool rib jumper",
"colour": "Rust",
"price": 95,
"stock": 26,
"reorder": 10,
"status": "live"
}
},
{
"id": "mp4",
"cells": {
"sku": "MP-HM-310",
"product": "Stoneware pour-over set",
"colour": "Ash glaze",
"price": 58,
"stock": 0,
"reorder": 6,
"status": "preorder"
}
},
{
"id": "mp5",
"cells": {
"sku": "MP-HM-322",
"product": "Linen tea towels, set of 3",
"colour": "Natural",
"price": 24,
"stock": 130,
"reorder": 30,
"status": "live"
}
},
{
"id": "mp6",
"cells": {
"sku": "MP-AC-118",
"product": "Felted wool beanie",
"colour": "Charcoal",
"price": 32,
"stock": 64,
"reorder": 20,
"status": "live"
}
},
{
"id": "mp7",
"cells": {
"sku": "MP-HM-405",
"product": "Oak serving board",
"colour": "Oiled oak",
"price": 45,
"stock": 5,
"reorder": 8,
"status": "low"
}
},
{
"id": "mp8",
"cells": {
"sku": "MP-WL-020",
"product": "Quilted gilet",
"colour": "Navy",
"price": 120,
"stock": 0,
"reorder": 10,
"status": "hidden"
}
}
],
"labels": {
"count": "{count} products",
"total": "Total",
"empty": "No products yet.",
"editHint": "Arrow keys move between cells. Enter or typing edits a cell, Enter saves, Escape cancels.",
"saving": "Saving…",
"saved": "All changes saved",
"invalid": "Enter a number from {min} to {max}",
"undo": "Undo",
"editLabel": "{column} for {row}"
}
}