# createLineDiff

Source: /tuil/docs/reference/components/structured-viewers/create-line-diff
Locale: en

createLineDiff component API, behavior, and executable example.





{/* Generated by tooling/docs/generate-reference.ts. */}

<PublishedStory storyId="component-acceptance" variant="LogViewer" />

## API and events [#api-and-events]

Inspect streaming logs, expandable structured values, and line-oriented changes in terminal-bounded viewports.

```tsx
export function createLineDiff(
  before: string,
  after: string,
): readonly DiffLine[];
```

### Props, functions, and events [#props-functions-and-events]

This declaration has no public members.

`LogViewer` reports follow state; JSON expansion can be controlled; pure transformation helpers emit nothing.

Callback props run after the documented input is accepted. Callbacks are not cancellable unless their return type or description states otherwise.

## Interaction and capabilities [#interaction-and-capabilities]

Viewers scroll and filter; JSON nodes expand or collapse; diff output remains deterministic in static mode.

The published manifest records keyboard, focus, pointer, theme, terminal, semantic, event, and dependency requirements.

## Complete import [#complete-import]

```tsx
import { createLineDiff } from "@/components/tuil/data-display/log-viewer";
```
