
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
mgr-form-react
Advanced tools
Simple react form component. Generates a form based on json description
Current package is under development and has the same name. It has breaking changes (basically it is rewritten from scratch, so nothing left from old version).
mgr-form-react
allows you to create complicated forms based on JSON description.
The form description can be provided via network and so be stored on a server, be loaded from client side and even be shared between clients.
Rendering of form's inputs is done by "renderes". mgr-form-react
provides you some default renderers such as input
, select
, checkbox
etc. but you can define and register your own renderers during the application runtime. In the same way you can add validations and transformations to your fields by registering them and using in the field description. Also, you can define disable
and hide
functions on a field level that will define when the field should be disabled or hidden.
The submission part of the form is rendered in the same way that form's fields. You can use the default renderer for the submission (showing just a button) or create your custom submission renderer.
To know more about capabilities of mgr-form-react
please refer to the documentation.
import Form from 'mgr-form-react';
const description = {
fields: [{
name: 'username',
renderer: 'input',
validators: 'required',
transformations: 'trim',
placeholder: 'Username'
}, {
name: 'email',
renderer: 'input',
validators: ['required', 'email'],
transformations: 'trim',
placeholder: 'email',
}, {
name: 'age',
label: 'Your age',
renderer: 'selector',
defaultValue: 1,
options: [{
label: '0-18',
value: 0,
}, {
label: '19-45',
value: 1,
}, {
label: '46-100',
value: 2,
}],
}],
submission: {
renderer: 'button',
label: 'Submit your data',
},
};
export default () => (
<Form description={description} />
);
To see more examples, please refer to the documentation.
This package exports a <Form />
component by default and some usefull functions:
FAQs
Simple react form component. Generates a form based on json description
The npm package mgr-form-react receives a total of 6 weekly downloads. As such, mgr-form-react popularity was classified as not popular.
We found that mgr-form-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.