README
Table of Contents
forml
@forml/decorator-bootstrap - A forml decorator for Bootstrap V4
forml is a lightweight and powerful form generator. Given a JSON schema, it creates React powered forms. This decorator produces forms designed with Bootstrap V4.
Documentation
View the documentation at forml.dev!
Examples
You can view the running demo.
Installation
# Substitute @forml/decorator-mui with your preferred decorator
npm i @forml/core @forml/decorator-bootstrap
Usage
Basic usage is as follows:
import { SchemaForm } from "@forml/core";
import * as decorator from "@forml/decorator-bootstrap";
import { useState } from "react";
export function MyForm(props) {
const [model, setModel] = useState("");
const schema = { type: "string", title: "Sample Form" };
const form = ["*"];
return (
<SchemaForm
model={model}
schema={schema}
decorator={decorator}
form={form}
onChange={onChange}
/>
);
function onChange(event, model) {
setModel(model);
}
}
Contributing
forml prides itself on being easily extensible. More UI packages are being added and contributions are welcome.