Getting Started
GolemUI is a blazing fast JavaScript library for building dynamic forms from JSON files or other data sources. It provides a Free and PRO set of UI components with support for React, Angular, Vue and Lit.
Create your first dynamic form
Section titled “Create your first dynamic form”Creating a dynamic form has never been this easy.
-
Install GolemUI and the Vanilla Components:
Section titled “Install GolemUI and the Vanilla Components:”Choose the framework you want to use for your project.
Terminal window npm i @golemui/core @golemui/react @golemui/react-vanilla --saveTerminal window npm i @golemui/core @golemui/angular @golemui/angular-vanilla --saveTerminal window npm i @golemui/core @golemui/lit @golemui/lit-vanilla --save -
Import the Vanilla Components styles:
Section titled “Import the Vanilla Components styles:”You can load the CSS file directly in your HTML or import it in your Sass/CSS file.
@import "@golemui/core/styles/index.css";@import "@golemui/core/styles/index.css";@import "@golemui/core/styles/index.css"; -
Create your first dynamic form:
Section titled “Create your first dynamic form:”Create a component that renders a form using the
FormComponent.const vanillaFieldLoaders = { ...Vanilla.vanillaFieldLoaders };const formDef = defineForm({form: [{ uid: '', kind: 'control', widget: 'textinput', path: 'username' }],});const formData = { username: 'golemui' };export function FormPage() {return (<div><React.FormComponentformDef={formDef}data={formData}fieldLoader={vanillaFieldLoaders}/></div>);}@Component({imports: [CommonModule, Angular.FormComponent],selector: 'app-dynamic-form',template: `<gui-form[formDef]="formDef"[data]="formData"[fieldLoaders]="vanillaFieldLoaders"></gui-form>`,})export class AppFormPage {protected formDef = defineForm({form: [{ uid: '', kind: 'control', widget: 'textinput', path: 'username' }],});protected formData = { username: 'golemui' };protected vanillaFieldLoaders = { ...Vanilla.vanillaFieldLoaders };}@customElement('lit-form')export class FormElement extends LitElement {formDef = defineForm({form: [{ uid: '', kind: 'control', widget: 'textinput', path: 'username' }],});formData = { username: 'golemui' };vanillaFieldLoaders = { ...Vanilla.vanillaFieldLoaders };override createRenderRoot() {return this;}render() {return html`<div><gui-form.formDef=${this.formDef}.data=${this.formData}.fieldLoaders=${this.vanillaFieldLoaders}></gui-form></div>`;}} -
That’s it!
Section titled “That’s it!”You can now see your form rendered in the browser.