1.0.4 • Published 3 years ago

ajjya-custom-form v1.0.4

Weekly downloads
27
License
MIT
Repository
github
Last release
3 years ago

Custom-form

Javascript custom select, checkbox, radiobox, input'file'

Installation

In the head tag add:

	<link href="path-to-library/style.min.css" rel="stylesheet">

Before your closing body tag add:

  <script type="text/javascript" src="path-to-library/polyfill.min.js"></script>
  <script type="text/javascript" src="path-to-library/customForm.js"></script>

Or by npm/yarn

  yarn add ajjya-custom-form
  OR
  npm install ajjya-custom-form

Then you can import:

  import CustomForm from 'ajjya-custom-form';

And add css file:

  @import 'node_modules/ajjya-custom-form/style.min.css';

Or scss file

  @import 'node_modules/ajjya-custom-form/customForm';

Usage

Then you can use library in next way:

  document.addEventListener('DOMContentLoaded', function () {
    const checkboxes = document.querySelectorAll('input[type="radio"]');
    checkboxes.forEach((item) => {
      new CustomForm(item);
    });
  });

You can see full code in example folder.

1.0.2

3 years ago

1.0.4

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago