A collection of Custom Components for json-edit-react.
You can use these as-is or modify them for your own particular use case.
Eventually, I'd like to publish these in a separate package so you can easily import them. But for now just copy the code out of this repo.
Contains a Vite web-app for previewing and developing components.
The individual components are in the /components
folder, along with demo data (in data.ts
).
Note
If you create a custom component that you think would be useful to others, please create a PR for it.
These are the ones currently available:
- Hyperlink/URL
- Undefined
-
Date
Object - Date/Time Picker (with ISO string)
- Boolean Toggle
-
NaN
-
BigInt
- Markdown
From within this folder: /custom-component-library
:
Install dependencies:
yarn install
Launch app:
yarn dev
Custom components should consider the following:
- Must respect editing restrictions
- If including CSS classes, please prefix with
jer-
- Handle keyboard input if possible (and double-click to edit)
- Provide customisation options, particularly styles