JSON Editor
An interactive tree-view editor for JSON data with inline editing, type detection, URL handling, and full CRUD operations on nested objects and arrays.
Basic
Basic JSON Editor
Edit simple key-value pairs with automatic type detection
import { JsonEditor } from 'fluxo-ui';
const [data, setData] = useState({
name: 'John Doe',
age: 30,
email: 'john@example.com',
active: true,
role: null,
});
<JsonEditor value={data} onChange={setData} />Nested Objects
Nested Objects
Deep object hierarchies with collapsible tree view
import { JsonEditor } from 'fluxo-ui';
const data = {
user: {
id: 1,
profile: { firstName: 'Jane', lastName: 'Smith' },
settings: { theme: 'dark', notifications: true },
},
};
<JsonEditor value={data} onChange={setData} expandDepth={2} />Arrays
Arrays & Nested Arrays
Full array editing with add, remove, and insert operations
import { JsonEditor } from 'fluxo-ui';
const data = {
fruits: ['Apple', 'Banana', 'Cherry'],
users: [
{ name: 'Alice', role: 'admin' },
{ name: 'Bob', role: 'user' },
],
};
<JsonEditor value={data} onChange={setData} expandDepth={2} />Data Types
Data Types & Type Badges
All supported data types with type badges and type changing
import { JsonEditor } from 'fluxo-ui';
<JsonEditor
value={data}
onChange={setData}
showDataTypes
allowTypeChange
/>Complex Data
Complex Nested Data
Real-world configuration with mixed nested objects, arrays, URLs, and null values
Read-Only
Read-Only Viewer
Display JSON data without edit capabilities
import { JsonEditor } from 'fluxo-ui';
<JsonEditor value={data} readOnly />Permissions
Permission Controls
Fine-grained control over edit, add, and remove operations
Values only (no key editing, no add/remove)
No delete allowed
No add allowed
<JsonEditor
value={data}
onChange={setData}
allowEditKey={false}
allowRemove={false}
allowInsert={false}
/>Sizes
Size Variants
Three size options for different use cases
Small
Medium (Default)
Large
Sorted Keys
Sorted Keys
Automatically sort object keys alphabetically
Default (insertion order)
Sorted keys
<JsonEditor value={data} onChange={setData} sortKeys />Import
import { JsonEditor } from 'fluxo-ui';
import type { JsonValue, JsonEditorProps } from 'fluxo-ui';Props
valueJsonValue"-"The JSON value to display and edit
valueJsonValue"-"The JSON value to display and edit
onChange(value: JsonValue) => void"-"Callback when the value changes
onChange(value: JsonValue) => void"-"Callback when the value changes
allowEditValueboolean"true"Allow editing values
allowEditValueboolean"true"Allow editing values
allowEditKeyboolean"true"Allow editing/renaming keys
allowEditKeyboolean"true"Allow editing/renaming keys
allowRemoveboolean"true"Allow removing properties/items
allowRemoveboolean"true"Allow removing properties/items
allowInsertboolean"true"Allow adding new properties/items
allowInsertboolean"true"Allow adding new properties/items
allowTypeChangeboolean"false"Show type badges with type changing
allowTypeChangeboolean"false"Show type badges with type changing
allowCopyboolean"true"Allow copying values to clipboard
allowCopyboolean"true"Allow copying values to clipboard
allowSearchboolean"true"Show search in toolbar
allowSearchboolean"true"Show search in toolbar
readOnlyboolean"false"Disable all editing
readOnlyboolean"false"Disable all editing
expandDepthnumber"1"Initial depth to auto-expand
expandDepthnumber"1"Initial depth to auto-expand
size'sm' | 'md' | 'lg'"'md'"Font and spacing size
size'sm' | 'md' | 'lg'"'md'"Font and spacing size
maxHeightstring | number"-"Max height with scroll overflow
maxHeightstring | number"-"Max height with scroll overflow
showDataTypesboolean"false"Show type labels next to values
showDataTypesboolean"false"Show type labels next to values
showItemCountboolean"true"Show item count for objects/arrays
showItemCountboolean"true"Show item count for objects/arrays
showToolbarboolean"true"Show the toolbar with search and actions
showToolbarboolean"true"Show the toolbar with search and actions
sortKeysboolean"false"Sort object keys alphabetically
sortKeysboolean"false"Sort object keys alphabetically
classNamestring"-"Additional CSS class
classNamestring"-"Additional CSS class
idstring"-"HTML id attribute
idstring"-"HTML id attribute
ariaLabelstring"-"Accessible label
ariaLabelstring"-"Accessible label
Features
Recursive Editing
Edit deeply nested objects and arrays with collapsible tree view and indentation guides
Smart Type Detection
Automatically detects strings, numbers, booleans, null, objects, arrays, and URLs
Inline Editing
Double-click to edit keys and values in place with keyboard shortcuts (Enter to save, Esc to cancel)
CRUD Operations
Add new properties/items, rename keys, edit values, and delete entries with confirmation
Permission Controls
Fine-grained boolean flags to control edit, add, remove, and type change capabilities
URL Detection
Automatically detects URLs and provides clickable launch buttons