JsonField
JsonField(
props):Element
Defined in: packages/ui/src/fields/json-field.tsx:21
Read-only display component that renders a JSON value as formatted code.
When collapsed is true, shows a single-line preview (truncated at 60 chars)
with an “expand” button. When expanded, displays the full pretty-printed JSON
in a <pre> block. Returns an em-dash for null/undefined values.
Parameters
Section titled “Parameters”See JsonFieldProps.
Returns
Section titled “Returns”Element
A <pre> with formatted JSON, a collapsed preview, or a
placeholder <span> for null values.
Example
Section titled “Example”<JsonField value={{ tags: ["react", "typescript"] }} collapsed />// -> '{"tags":["react","typescript"]}' with expand button