React package · v0.1.0
react-json-glimpse
A small, virtualized JSON viewer for React apps that need readable payload previews without bringing along an old dependency tree.
React package · v0.1.0
A small, virtualized JSON viewer for React apps that need readable payload previews without bringing along an old dependency tree.
Why it exists
Sometimes you just need to show a large JSON payload in a React UI. This focuses on that read-only path: visible rows are virtualized, collapsed branches stay cheap, and styling is handled with CSS variables instead of another theme dependency.
Install
pnpm add react-json-glimpseUse
import { JsonGlimpse } from "react-json-glimpse";
export function PayloadPreview({ payload }: { payload: unknown }) {
return (
<JsonGlimpse
value={payload}
height={520}
initialExpandedDepth={2}
onSelect={({ path, value }) => console.log(path, value)}
/>
);
}What it is good at