1.0.3 • Published 5 years ago

input-generator v1.0.3

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

Input Generator

Generate dynamic inputs with javascript

Installation

Use the package manager npm to install input-generator.

npm install input-generator

Usage

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

KeyType
idstring
namestring
classstring
placeholderstring
defaultValuestring
isDisabledboolean
isRequiredboolean

Input Parameters

KeyType
typetext, email, password
placeholderstring

Select Parameters

KeyType
multipleboolean
options[]{ value: string, text: string: selected?: boolean }

License

MIT

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

5 years ago

0.0.18

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago