Skip to content

Latest commit

 

History

History

custom-component-library

Custom Component Library

A collection of Custom Components for json-edit-react.

You can use these as-is or modify them for your own particular use case.

screenshot

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.

Components

These are the ones currently available:

  • Hyperlink/URL
  • Undefined
  • Date Object
  • Date/Time Picker (with ISO string)
  • Boolean Toggle
  • NaN
  • BigInt
  • Markdown

Development

From within this folder: /custom-component-library:

Install dependencies:

yarn install

Launch app:

yarn dev

Guidelines for development:

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