Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
JavaScript form libraries build web forms from a definition, such as a JSON Schema or a form model, rather than from hand-written inputs. The library reads that definition and renders each field with its label, default value, and validation rules. These libraries generate the surveys, admin forms, and data entry screens that web apps use to collect structured input.
Popularity
@rjsf/core has the most monthly downloads in this comparison, at 6.7M.
trial(display_element: HTMLElement, trial: TrialType<Info>) {
// check for empty JSON and no survey function if (JSON.stringify(trial.survey_json) === "{}" && trial.survey_function === null) {
console.error(
"Survey plugin warning: you must define the survey using a non-empty JSON object and/or a survey function."
);
}
this.survey = new Model(trial.survey_json);
if (trial.survey_function !== null) {
trial.survey_function(this.survey);
}
// apply our custom theme this.applyStyles(this.survey);
if (trial.validation_function) {
this.survey.onValidateQuestion.add(trial.validation_function);
}
this.survey.onComplete.add((sender, options) => {
// add default values to any questions without responses const all_questions = sender.getAllQuestions();
const data_names = Object.keys(sender.data);
for (const question of all_questions) {
if (!data_names.includes(question.name)) {
sender.mergeData({ [question.name]: question.defaultValue ?? null });
}
}
// finish trial and save data this.jsPsych.finishTrial({
rt: Math.round(performance.now() - this.start_time),
response: sender.data,
});
});
// As of the SurveyJS v2.2 update, we need to create a new container for the survey to render in. // Otherwise the rendering fails silently with repeated similar survey trials. const survey_container = this.createSurveyContainer(display_element, trial.min_width);
this.survey.render(survey_container);
this.start_time = performance.now();
}
@jsonforms/core
Provides the core functionality that JSON Forms renderers need to display a form.
Downloads / mo
1.7M
Stars
2.8K
Last release
3.8.0
License
MIT
Strengths
Separates data and layout.Describe control order, visibility, and layout in a UI schema next to the data schema.
Limitations
Needs a UI framework binding.Pair the core package with the React, Angular, or Vue binding.
init(editable = false): void {
// JSONEditor has several modes, in edit mode we want more modes than in view mode let modes = ['view'];
if (editable) {
modes = modes.concat(['tree', 'code', 'form']);
}
const options = {
modes: modes,
onModeChange: (newMode: string): void => {
if (newMode === 'code') {
(this.editorDiv.firstChild as HTMLDivElement).style.height = '500px';
}
},
onChange: (): void => {
// make the save button stand out if the content is changed document.querySelector('[data-action="json-save"]').classList.add('border-danger');
document.getElementById('jsonUnsavedChangesWarningDiv').removeAttribute('hidden');
},
};
// instantiate the editor this.editor = new JSONEditor(this.editorDiv, options);
// default mode is tree if editable if (editable) {
this.editor.setMode('tree');
}
if (this.editorDiv.dataset.preloadJson === '1') {
this.loadMetadata();
}
// TODO: make a PR in upstream repo to implement proper label support document.querySelector('.jsoneditor-frame input[type="text"]')?.setAttribute('aria-label', 'Search metadata');
}
@ngx-formly/core
Builds dynamic, JSON-powered forms for Angular.
Downloads / mo
1.1M
Stars
3.0K
Last release
11.3.0
License
MIT
Strengths
Reads Formly and JSON schemas.Define fields in Formly's own schema or convert a JSON Schema.
Builds on Reactive Forms.Each generated field binds to an Angular Reactive Forms control.
Limitations
Angular only.React and Vue apps need a different form library.
const ok = async () => {
const value = editor && editor.getValue()
if (value) {
value.repos.forEach((repo: any) => {
let { name, path } = repo
name = name.trim()
path = path.trim()
if (!name && path) {
// default name repo.name = basename(path).substring(0, 10)
} else if (name && !path) {
const msg = t('setting-panel.error-choose-repo-path')
toast.show('warning', msg)
throw new Error(msg)
}
})
const errors = editor.validate()
if (errors.length) {
console.log('json-editor', errors)
errors.forEach((error: any) => {
const path = error.path
if (path) {
// highlight field showSettingPanel(path.replace(/^root\./, ''))
}
toast.show('warning', error.message)
throw new Error(error.message)
})
}
await writeSettings({ ...value })
}
close()
}
FAQ
For a React app that already has a JSON Schema, @rjsf/core renders the form from it. survey-core fits multi-page surveys with conditional logic, and @ngx-formly/core fits Angular apps.
jsoneditor is a web-based tool that views, edits, formats, and validates JSON in tree, code, or text mode. @json-editor/json-editor is a separate library that generates an HTML form from a JSON Schema.
FormKit is a form framework whose core package, @formkit/core, tracks each input as a node with its own value, configuration, and events. A renderer package, such as the Vue one, draws the inputs.
Survey Creator is a drag-and-drop form builder that generates SurveyJS JSON form definitions, and survey-creator-core holds its editor model. Each developer who integrates it needs a commercial license.
Pass the schema and a validator package to the Form component from @rjsf/core. A uiSchema then changes widgets and layout without editing the schema.
JSON Forms renders a form from two schemas: a JSON Schema for the data and a UI schema for the order, visibility, and layout of the controls. Its core package pairs with a React, Angular, or Vue binding.
For coding agents
Found your form library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.