Benjamin Swerdlow

Grok Write

Component

About

Grok's inline write/edit chrome — line-numbered before/after inside a ┃ gutter, with optional hook ✓/✗ lines.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Grok Write to your project and fits it to your theme.

Code

How Grok Write is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { GrokWrite } from "@/components/ui/brainless-grok-write";

export default function GrokWriteDemo() {
  return (
    <div className="w-full max-w-3xl overflow-x-auto border border-[#2b2b2b] bg-[#1a1a1a] p-5 text-[#c0caf5]">
        <GrokWrite
          before={[{ n: 1, text: "hello" }]}
          after={[{ n: 1, text: "world" }]}
          hooks={{
            pre: [
              { label: "global/settings:pre_tool_use[0].hooks[0]", ok: true, ms: 11 },
              { label: "global/orca-status:pre_tool_use[0].hooks[0]", ok: true, ms: 9 },
            ],
            post: [
              { label: "global/settings:post_tool_use[0].hooks[0]", ok: true, ms: 9 },
              {
                label: "global/settings:post_tool_use[1].hooks[0]",
                ok: false,
                ms: 0,
                detail: "hook not executed: required env var(s) not set",
              },
            ],
          }}
        />
    </div>
  );
}

More by Benjamin Swerdlow

View all
  • Pied Piper Onboarding

    Pied Piper Onboarding

  • Grok Session

    Grok Session

  • Grok Session Active

    Grok Session Active

  • Grok Plan

    Grok Plan

  • Codex Session

    Codex Session

  • Claude Session

    Claude Session

  • Grok Slash Menu

    Grok Slash Menu

  • Codex Slash Menu

    Codex Slash Menu