Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.65 KB

README.md

File metadata and controls

50 lines (30 loc) · 1.65 KB

react-jsonschema-form-bs4

A port of react-jsonschema-form to Bootstrap 4.

See the main repository for documentation.

This version is based on react-jsonschema-form v1.5.0

Installation

npm install react-jsonschema-form-bs4

Reporting bugs

If you find a bug that is specific to the Bootstrap 4 port, please report here.

If you find a bug that is present in the main version (maintained by mozilla-services), please report here

Usage with Bootstrap 4

This is a fork of https://github.com/peterkelly/react-jsonschema-form-bs4 which supports Bootstrap 4.

Since Bootstrap 4 no longer includes Glyphicons, you need to use Font Awesome instead. You can do this by adding the following to your index.html file:

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"

Why we have created this?

The original work does not support custom buttons UI. You can provide your own button component instead of the default as a property.

<Form
    IconButtonComponent={({ type, className, icon, ...otherProps }) => <button
    type="button"
    className={`btn btn-${type} ${className}`}
    {...otherProps}>
    <FontAwesome icon={icon} />
    </button>}
/>
                                                    

License

Apache 2