1.0.3 • Published 5 years ago
input-generator v1.0.3
Input Generator
Generate dynamic inputs with javascript
Installation
Use the package manager npm to install input-generator.
npm install input-generatorUsage
Basic
import { InputGenerator } from "input-generator";
const userForm = new InputGenerator();
const nameInput: HTMLInputElement = userForm.input({
id: "name-input",
name: "name",
class: "form-control",
defaultValue: "example",
isDisabled: false,
isRequired: true,
type: "text",
placeholder: "Please Enter Name",
});
const citySelect: HTMLSelectElement = userForm.select({
id: "select-input",
name: "select",
class: "form-control",
defaultValue: "35",
isDisabled: false,
isRequired: true,
type: "text",
placeholder: "Please Select City",
multiple: false,
options: [{ text: "İzmir", value: "35" }],
});Parameters
Common Parameters
| Key | Type |
|---|---|
| id | string |
| name | string |
| class | string |
| placeholder | string |
| defaultValue | string |
| isDisabled | boolean |
| isRequired | boolean |
Input Parameters
| Key | Type |
|---|---|
| type | text, email, password |
| placeholder | string |
Select Parameters
| Key | Type |
|---|---|
| multiple | boolean |
| options | []{ value: string, text: string: selected?: boolean } |
License
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.20
6 years ago
0.0.18
6 years ago
0.0.19
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago