Unified diff with tinted add and remove rows, line numbers, and +/− prefix column.
export function Button({ label }) {return <button>{label}</button>;return <button className="btn">{label}</button>;}
Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.
import { Editor4 } from "@/components/beste/piece/editor4";
<Editor4
filename="button.tsx"
lines={[
{
"kind": "context",
"line": 12,
"content": "export function Button({ label }) {"
},
{
"kind": "remove",
"line": 13,
"content": " return <button>{label}</button>;"
},
{
"kind": "add",
"content": " return <button className=\"btn\">{label}</button>;"
},
{
"kind": "context",
"line": 14,
"content": "}"
}
]}
/>1function·greet(name)·{2→return·`Hello,·${name}!`;3}
Code lines with muted middle-dots for spaces and → glyphs for tabs, revealing indentation.
const name = 'Ayşe';const role = 'design';const team = 'core';
Stacked code lines each with a primary-tinted blinking caret at the same column plus a header count.
--primary: #f43f5e;--accent: #8b5cf6;--surface: #0ea5e9;
CSS lines with inline color swatch squares next to each hex value.
1// TODO migrate to server components2// FIXME handles null state poorly3// NOTE revisit once design lock lands
Italic comment lines with colored TODO, FIXME, NOTE, or HACK tags.
Code template with dashed-outline tab stops. Active placeholder tints primary, others stay muted.
Two-row editor find bar with match counter, case/regex toggles, prev/next, replace, and replace-all.