Gathering detailed insights and metrics for d-dynamic-form-builder-react
Gathering detailed insights and metrics for d-dynamic-form-builder-react
npm install d-dynamic-form-builder-react
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.1
Supply Chain
97.4
Quality
75.3
Maintenance
100
Vulnerability
99.3
License
TypeScript (89.57%)
CSS (8.72%)
HTML (0.9%)
JavaScript (0.82%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,713
Last Day
1
Last Week
4
Last Month
29
Last Year
259
MIT License
23 Commits
1 Watchers
1 Branches
1 Contributors
Updated on May 19, 2023
Minified
Minified + Gzipped
Latest Version
0.2.1
Package Id
d-dynamic-form-builder-react@0.2.1
Unpacked Size
214.83 kB
Size
40.44 kB
File Count
48
NPM Version
8.19.1
Node Version
16.17.0
Published on
May 25, 2023
Cumulative downloads
Total Downloads
Last Day
-50%
1
Compared to previous day
Last Week
-20%
4
Compared to previous week
Last Month
7.4%
29
Compared to previous month
Last Year
-82.2%
259
Compared to previous year
1
The Dynamic "d-dynamic-form-builder-react" is a container for dynamic forms that allows rendering and handling different forms with custom input fields.
npm i d-dynamic-form-builder-react
import { DynamicFormContainer, Form } from 'd-dynamic-form-builder-react';
import { InputProps } from 'd-dynamic-form-builder-react/dist/interfaces/interfaces';
const App = () => {
const forms: { [x: string]: InputProps[] } = {
login: [
{
type: "text",
name: "name",
label: "Full Name",
placeholder: "Full Name",
value: "",
validations: [
{
type: "required",
message: "Full Name is required",
},
],
},
{
type: "email",
name: "email",
label: "E-mail",
placeholder: "E-mail",
value: "",
validations: [
{
type: "required",
message: "Email is required",
},
{
type: "isEmail",
message: "Email no valid",
},
],
},
{
type: "password",
name: "password",
label: "Password",
placeholder: "*******",
value: "",
validations: [
{
type: "required",
message: "Password is required",
},
],
},
],
};
return (
<>
<DynamicFormContainer
formSchema={forms}
formTitle={"Form"}
>
{(values) => (
<>
<Form />
</>
)}
</DynamicFormContainer>
</>
);
};
Property | Type | Description |
---|---|---|
type | "text" | "textarea" | "email" | "password" | "radio-group" | "select" | "checkbox" | "checkbox-group" | "field-array" | The type of the input field. |
name | string | The name of the input field. |
value | string | number | boolean | string[] | DefaultJSON[] | The value of the input field. |
validations | Validation[] | (Optional) An array of validation rules for the input field. |
placeholder? | string | (Optional) The placeholder text for the input field. |
typeValue? | "string" | "boolean" | "array" | (Optional) The type of the value property. |
label? | string | (Optional) The label for the input field. |
options? | Opt[] | (Optional) An array of options for select or radio-group input fields. |
fields? | Fields[] | (Optional) An array of fields for field-array input type. Each field is of type Fields which has properties similar to InputProps . |
Interface | Properties | Description |
---|---|---|
Opt | - value : string | number- desc : string | Represents an option. - value : The value of the option.- desc : The description of the option. |
Fields | - type : "text"- name : string- label : string- placeholder? : string | Represents a field. - type : The type of the field.- name : The name of the field.- label : The label of the field.- placeholder? : (Optional) The placeholder text for the field. |
Validation | - type : "required" | "isEmail" | "minLength" | "isTrue" | "maxLength" | "matches" | "isUrl" | "maxDate" | "minDate"- value? : string | number | boolean | RegExp | Date- message : string | Represents a validation rule for a field. - type : The type of validation.- value? : (Optional) The value for the validation.- message : The validation error message. |
DefaultJSON | { [key: string]: any } | Represents a JSON object with any value types for its properties. |
No vulnerabilities found.
No security vulnerabilities found.