ajjya-custom-form

1.0.4 • Public • Published

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.

Package Sidebar

Install

npm i ajjya-custom-form

Weekly Downloads

5

Version

1.0.4

License

MIT

Unpacked Size

31.7 kB

Total Files

9

Last publish

Collaborators

  • vladyslava.prykhodko