Components / AI components / Coding & artifacts
Coding workspaceExperimental alpha
CodeDiff
Readable unified and split comparisons with line numbers and explicit limits.
CodeDiff preview
Loading example…
Interactions use local sample data.
Usage and props
Supply immutable text versions and access state. Copy is read-only; the host owns patch application. Optional HighlightedCodeDiff uses the /highlight entry.
Supported inputs
This is the public signature used by this example. Open Code to see how the values and callbacks fit together.
path · before · after · baseVersion · nextVersion · status? · error? · copyable? · renderLine?These are the main props for the example. The package's TypeScript declarations include the full API.