# @json-edit-react/components Ready-to-use custom node components for **[json-edit-react](https://github.com/CarlosNZ/json-edit-react)**. Fully tree-shakeable — only bundle what you use. Almost all have zero external dependencies, and those that do are clearly marked as such below. Check out the custom components in action in the [Custom Component Library demo page](https://carlosnz.github.io/json-edit-react/?data=customComponentLibrary) > [!IMPORTANT] > Requires **json-edit-react** version 2.x ## Install ```sh npm install @json-edit-react/components # or yarn add @json-edit-react/components # or pnpm add @json-edit-react/components ``` ## Available components Each component ships a React component plus a definition factory that produces a `CustomNodeDefinition` ready to drop into `customNodeDefinitions`. | Component | Use case | External deps | | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `Hyperlink` | Detects URL strings and renders them as clickable links ([details](#hyperlink--clickable-urls)) | — | | `EnhancedLink` | Object-shaped data with `{text, url}` rendered as a link ([details](#enhancedlink--labelled-links)) | — | | `DatePicker` | ISO date strings, edited via a swappable date-picker widget passed through `componentProps.DatePicker` ([details](#datepicker--a-swappable-picker-widget)) | `react-datepicker` *(opt-in widget)* | | `DateObject` | JavaScript `Date` objects ([details](#dateobject--javascript-date-values)) | — | | `UnixTimestamp` | Epoch numbers (seconds or milliseconds) shown as a date, edited via the same swappable picker as `DatePicker` ([details](#unixtimestamp--epoch-numbers-as-dates)) | `react-datepicker` *(opt-in widget)* | | `ColorPicker` | Hex/RGB/HSL color strings, edited via `react-colorful` ([details](#colorpicker--colours-with-a-visual-picker)) | `react-colorful`, `colord`, `use-debounce` | | `Markdown` | Markdown-formatted strings, rendered via `react-markdown` ([details](#markdown--rendered-markdown)) | `react-markdown` | | `Image` | Image URLs displayed inline ([details](#image--inline-image-previews)) | — | | `BooleanToggle` | Boolean values rendered as a toggle switch ([details](#booleantoggle--a-one-click-switch)) | — | | `BigInt` | `BigInt` values ([details](#bigint--very-large-integers)) | — | | `NaN` | `NaN` value display ([details](#nan--the-not-a-number-value)) | — | | `Symbol` | `Symbol` value display ([details](#symbol--javascript-symbols)) | — | | `Undefined` | `undefined` value display ([details](#undefined--the-undefined-value)) | — | | `ErrorIndicator` | Wraps a node with a glyph (default ⚠️) to flag the nodes you target via `condition` — e.g. validation errors ([details](#errorindicator--flag-nodes-with-a-glyph)) | — | | `AutoType` | Edit-only text input on every value node that infers the type from what you type — `12.3` → number, `true` → boolean, `{…}`/`[…]` → object/array, otherwise a string ([details](#autotype--type-follows-the-input)) | — | | `NumberFormatter` | Numbers formatted via `Intl.NumberFormat` (thousands separators, currency, percent, …), edited as the raw number ([details](#numberformatter--locale-aware-number-formatting)) | — | | `Chips` | Arrays of strings shown as removable chips, with an inline add — free text, or picked from a fixed list ([details](#chips--tags-and-labels)) | — | ### Editor slot widgets Standalone components that plug into JsonEditor's `Select` and `TextEditor` props (not into `customNodeDefinitions`) to replace a built-in UI control. They ship under their own subpath — **`@json-edit-react/components/widgets`** — kept off the package root because they're a different mechanism from the node-definition components above. | Widget | Use case | | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ReactSelect` | Drop-in replacement for the built-in `