Skip to content
← Row Actions
Edit Row Actions
Name
Also known as (comma separated)
Brief definition
Actions attached to a row.
Notes
Tier
Core
Useful
Reference
Deleted
Controls schema (JSON array)
[ { "id": "caption", "type": "text", "label": "Caption", "default": "Customer orders" }, { "id": "accent", "type": "color", "label": "Accent", "default": "#241430", "presets": [ "#241430", "#A8E6C1", "#F5C2E0", "#BFD9F2", "#D9C8F0", "#E8A020" ] }, { "id": "actionsVisible", "type": "toggle", "label": "Always show actions", "default": false }, { "id": "editLabel", "type": "text", "label": "Edit label", "default": "Edit" }, { "id": "deleteLabel", "type": "text", "label": "Delete label", "default": "Delete" } ]
Templates (JSON object keyed by format)
{ "html": "<div class=\"ract{{#if actionsVisible}} ract--visible{{/if}}\" style=\"--accent:{{accent}};\">\n <div class=\"ract__scroll\">\n <table class=\"ract__table\">\n <caption>{{caption}}</caption>\n <thead><tr><th scope=\"col\">Order</th><th scope=\"col\">Customer</th><th scope=\"col\">Status</th><th scope=\"col\">Total</th><th scope=\"col\"><span class=\"sr-only\">Actions</span></th></tr></thead>\n <tbody>\n <tr class=\"ract__row\"><td>#1042</td><td>A. Whitfield</td><td>Shipped</td><td>£64.00</td><td class=\"ract__actions\"><button type=\"button\" class=\"ract__btn\">{{editLabel}}</button><button type=\"button\" class=\"ract__btn ract__btn--danger\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row\"><td>#1041</td><td>R. Okafor</td><td>Processing</td><td>£128.50</td><td class=\"ract__actions\"><button type=\"button\" class=\"ract__btn\">{{editLabel}}</button><button type=\"button\" class=\"ract__btn ract__btn--danger\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row\"><td>#1040</td><td>M. Iqbal</td><td>Shipped</td><td>£22.00</td><td class=\"ract__actions\"><button type=\"button\" class=\"ract__btn\">{{editLabel}}</button><button type=\"button\" class=\"ract__btn ract__btn--danger\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row\"><td>#1039</td><td>S. Novak</td><td>Refunded</td><td>£40.00</td><td class=\"ract__actions\"><button type=\"button\" class=\"ract__btn\">{{editLabel}}</button><button type=\"button\" class=\"ract__btn ract__btn--danger\">{{deleteLabel}}</button></td></tr>\n </tbody>\n </table>\n </div>\n</div>\n<style>\n.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}\n.ract { font: 14px system-ui, sans-serif; color: #241430; background: #FAF7F2; max-width: 480px; border: 1px solid #24143020; border-radius: 10px; overflow: hidden; }\n.ract__scroll { overflow-x: auto; }\n.ract__table { border-collapse: collapse; width: 100%; }\n.ract__table caption { text-align: left; font-weight: 600; padding: 10px 14px; }\n.ract__table th, .ract__table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #24143020; white-space: nowrap; }\n.ract__table th { background: var(--accent); color: #FAF7F2; }\n.ract__actions { display: flex; gap: 6px; opacity: 0; }\n.ract__row:hover .ract__actions, .ract__row:focus-within .ract__actions { opacity: 1; }\n.ract--visible .ract__actions { opacity: 1; }\n@media (prefers-reduced-motion: no-preference) {\n .ract__actions { transition: opacity .12s; }\n}\n.ract__btn { font-size: 12px; border: 1px solid #24143040; background: #FAF7F2; border-radius: 4px; padding: 4px 8px; cursor: pointer; }\n.ract__btn:hover { background: #24143010; }\n.ract__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }\n.ract__btn--danger { color: #c0392b; border-color: #c0392b60; }\n</style>", "tailwind": "<div class=\"max-w-[480px] rounded-[10px] border border-[#24143020] font-sans text-sm text-[#241430] bg-[#FAF7F2] overflow-hidden\" style=\"--accent:{{accent}};\">\n <div class=\"overflow-x-auto\">\n <table class=\"border-collapse w-full\">\n <caption class=\"text-left font-semibold px-3.5 py-2.5\">{{caption}}</caption>\n <thead><tr class=\"text-[#FAF7F2]\" style=\"background:{{accent}}\">\n <th scope=\"col\" class=\"p-3.5 text-left whitespace-nowrap\">Order</th>\n <th scope=\"col\" class=\"p-3.5 text-left whitespace-nowrap\">Customer</th>\n <th scope=\"col\" class=\"p-3.5 text-left whitespace-nowrap\">Status</th>\n <th scope=\"col\" class=\"p-3.5 text-left whitespace-nowrap\">Total</th>\n <th scope=\"col\" class=\"p-3.5\"><span class=\"sr-only\">Actions</span></th>\n </tr></thead>\n <tbody>\n <tr class=\"ract__row group\"><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">#1042</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">A. Whitfield</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">Shipped</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">£64.00</td><td class=\"ract__actions p-3.5 border-b border-[#24143020] flex gap-1.5 opacity-0 motion-safe:transition-opacity{{#if actionsVisible}} opacity-100{{/if}}\"><button type=\"button\" class=\"text-xs border border-[#24143040] bg-[#FAF7F2] rounded px-2 py-1\">{{editLabel}}</button><button type=\"button\" class=\"text-xs border border-[#c0392b60] text-[#c0392b] bg-[#FAF7F2] rounded px-2 py-1\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row group\"><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">#1041</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">R. Okafor</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">Processing</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">£128.50</td><td class=\"ract__actions p-3.5 border-b border-[#24143020] flex gap-1.5 opacity-0 motion-safe:transition-opacity{{#if actionsVisible}} opacity-100{{/if}}\"><button type=\"button\" class=\"text-xs border border-[#24143040] bg-[#FAF7F2] rounded px-2 py-1\">{{editLabel}}</button><button type=\"button\" class=\"text-xs border border-[#c0392b60] text-[#c0392b] bg-[#FAF7F2] rounded px-2 py-1\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row group\"><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">#1040</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">M. Iqbal</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">Shipped</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">£22.00</td><td class=\"ract__actions p-3.5 border-b border-[#24143020] flex gap-1.5 opacity-0 motion-safe:transition-opacity{{#if actionsVisible}} opacity-100{{/if}}\"><button type=\"button\" class=\"text-xs border border-[#24143040] bg-[#FAF7F2] rounded px-2 py-1\">{{editLabel}}</button><button type=\"button\" class=\"text-xs border border-[#c0392b60] text-[#c0392b] bg-[#FAF7F2] rounded px-2 py-1\">{{deleteLabel}}</button></td></tr>\n <tr class=\"ract__row group\"><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">#1039</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">S. Novak</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">Refunded</td><td class=\"p-3.5 border-b border-[#24143020] whitespace-nowrap\">£40.00</td><td class=\"ract__actions p-3.5 border-b border-[#24143020] flex gap-1.5 opacity-0 motion-safe:transition-opacity{{#if actionsVisible}} opacity-100{{/if}}\"><button type=\"button\" class=\"text-xs border border-[#24143040] bg-[#FAF7F2] rounded px-2 py-1\">{{editLabel}}</button><button type=\"button\" class=\"text-xs border border-[#c0392b60] text-[#c0392b] bg-[#FAF7F2] rounded px-2 py-1\">{{deleteLabel}}</button></td></tr>\n </tbody>\n </table>\n </div>\n</div>\n<style>\n.ract__row:hover .ract__actions, .ract__row:focus-within .ract__actions { opacity: 1; }\n</style>", "react": "function RowActions({\n caption = \"{{caption}}\",\n accent = \"{{accent}}\",\n actionsVisible = {{actionsVisible}},\n editLabel = \"{{editLabel}}\",\n deleteLabel = \"{{deleteLabel}}\",\n}) {\n const rows = [\n [\"#1042\", \"A. Whitfield\", \"Shipped\", \"£64.00\"],\n [\"#1041\", \"R. Okafor\", \"Processing\", \"£128.50\"],\n [\"#1040\", \"M. Iqbal\", \"Shipped\", \"£22.00\"],\n [\"#1039\", \"S. Novak\", \"Refunded\", \"£40.00\"],\n ];\n const cell = { padding: \"10px 14px\", borderBottom: \"1px solid #24143020\", whiteSpace: \"nowrap\" };\n return (\n <div style={{ maxWidth: 480, borderRadius: 10, border: \"1px solid #24143020\", overflow: \"hidden\", font: \"14px system-ui, sans-serif\", color: \"#241430\", background: \"#FAF7F2\" }}>\n <div style={{ overflowX: \"auto\" }}>\n <table style={{ borderCollapse: \"collapse\", width: \"100%\" }}>\n <caption style={{ textAlign: \"left\", fontWeight: 600, padding: \"10px 14px\" }}>{caption}</caption>\n <thead>\n <tr style={{ background: accent, color: \"#FAF7F2\" }}>\n {[\"Order\", \"Customer\", \"Status\", \"Total\", \"\"].map((h, i) => <th key={i} scope=\"col\" style={cell}>{h}</th>)}\n </tr>\n </thead>\n <tbody>\n {rows.map((row) => (\n <tr key={row[0]} className=\"ract-row\">\n {row.map((c, j) => <td key={j} style={cell}>{c}</td>)}\n <td style={cell}>\n <span style={{ display: \"flex\", gap: 6, opacity: actionsVisible ? 1 : undefined }} className=\"ract-actions\">\n <button type=\"button\" style={{ fontSize: 12, border: \"1px solid #24143040\", background: \"#FAF7F2\", borderRadius: 4, padding: \"4px 8px\", cursor: \"pointer\" }}>{editLabel}</button>\n <button type=\"button\" style={{ fontSize: 12, border: \"1px solid #c0392b60\", color: \"#c0392b\", background: \"#FAF7F2\", borderRadius: 4, padding: \"4px 8px\", cursor: \"pointer\" }}>{deleteLabel}</button>\n </span>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n <style>{\"\\n.ract-row .ract-actions { opacity: 0; }\\n.ract-row:hover .ract-actions, .ract-row:focus-within .ract-actions { opacity: 1; }\\n@media (prefers-reduced-motion: no-preference) {\\n .ract-row .ract-actions { transition: opacity .12s; }\\n}\\n\"}</style>\n </div>\n );\n}" }
Save
History