Git Blame

Code lines with inline blame showing author, relative time, and short commit hash to the right.

const greet = (name: string) =>Ayşe·3d ago·a1b2c3d
`Merhaba, ${name}!`;Merve·today·9f0e4c2
 Ayşe·3d ago·a1b2c3d

Requires shadcn/ui initialized. Run npx shadcn@latest init if you haven't.

Import & use
import { Editor20 } from "@/components/beste/piece/editor20";

<Editor20
  lines={[
    {
      "line": 40,
      "author": "Ayşe",
      "time": "3d ago",
      "hash": "a1b2c3d",
      "code": "const greet = (name: string) =>"
    },
    {
      "line": 41,
      "author": "Merve",
      "time": "today",
      "hash": "9f0e4c2",
      "code": "  `Merhaba, ${name}!`;"
    },
    {
      "line": 42,
      "author": "Ayşe",
      "time": "3d ago",
      "hash": "a1b2c3d",
      "code": ""
    }
  ]}
/>