BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/brainless/claude-diff

Claude Diff

brainless/claude-diff
FreeComponent

An inline edit hunk with tinted +/- rows, line numbers, and off-screen added/removed labels.

Install it

npx shadcn@latest add https://brainless.swerdlow.dev/r/claude-diff.json

Source

registry/brainless/claude/claude-diff.tsxbrainless.swerdlow.dev/r/claude-diff.json
1import * as React from "react";
2import { cn } from "@/lib/utils";
3
4/**
5 * ClaudeDiff — Claude Code's inline edit hunk (the ⏺ Update / ⎿ summary + the
6 * +/- lines). Added/removed rows carry semantic tinted backgrounds and an
7 * off-screen "added"/"removed" label so the diff is legible without color.
8 */
9export type DiffLine = {
10 type: "add" | "del" | "ctx";
11 n?: number;
12 text: string;
13};
14
15const GREEN = "#4ea96f";
16
17export function ClaudeDiff({
18 file,
19 summary,
20 lines,
21 className,
22}: {
23 file: string;
24 summary?: string;
25 lines: DiffLine[];
26 className?: string;
27}) {
28 return (
29 <div className={cn("min-w-0 font-mono text-[13px] leading-[1.55]", className)}>
30 <div className="flex min-w-0 flex-wrap items-baseline gap-x-2">
31 <span aria-hidden className="shrink-0" style={{ color: GREEN }}>
32 ⏺
33 </span>
34 <span className="text-[#c0caf5]">Update</span>
35 <span className="min-w-0 break-all">
36 <span className="text-[#565f89]">(</span>
37 <span className="text-[#7dcfff]">{file}</span>
38 <span className="text-[#565f89]">)</span>
39 </span>
40 </div>
41 {summary ? (
42 <div className="flex min-w-0 items-baseline gap-2 text-[#8b8fa3]">
43 {/* invisible status glyph spacer: aligns ⎿ under "Update" */}
44 <span aria-hidden className="invisible shrink-0">
45 ⏺
46 </span>
47 <span aria-hidden className="shrink-0" style={{ color: "#565f89" }}>
48 ⎿
49 </span>
50 <span className="min-w-0 break-words">{summary}</span>
51 </div>
52 ) : null}
53
54 <pre className="mt-1 min-w-0 overflow-x-auto rounded-none border border-[#202022] bg-[#101010] py-1.5 pl-2 pr-3">
55 {lines.map((l, i) => {
56 const bg =
57 l.type === "add"
58 ? "rgba(78, 169, 111,.10)"
59 : l.type === "del"
60 ? "rgba(247,118,142,.12)"
61 : "transparent";
62 const mark = l.type === "add" ? "+" : l.type === "del" ? "-" : " ";
63 const markColor =
64 l.type === "add" ? GREEN : l.type === "del" ? "#f7768e" : "#565f89";
65 return (
66 <div key={i} className="flex min-w-0" style={{ background: bg }}>
67 <span
68 className="w-9 shrink-0 select-none pr-2 text-right"
69 style={{ color: "#3b3f52" }}
70 >
71 {l.n ?? ""}
72 </span>
73// … truncated

Files it writes

  • registry/brainless/claude/claude-diff.tsx

Facts

Registry
brainless
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

brainless.swerdlow.dev theswerd/brainless on GitHub Raw registry item This item as JSON

More from brainless

All 40 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Claude Headerclaude-headerbrainlessComponentsFreeno deps
Claude Messageclaude-messagebrainlessComponentsFreeno deps
Claude Permissionclaude-permissionbrainlessComponentsFreeno deps
Claude Promptclaude-promptbrainlessComponentsFreeno deps
Claude Slash Menuclaude-slash-menubrainlessComponentsFreeno deps
Claude Thinkingclaude-thinkingbrainlessComponentsFreeno deps
Claude Todo Listclaude-todo-listbrainlessComponentsFreeno deps
Claude Tool Callclaude-tool-callbrainlessComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex