Skip to content

Support for emails input as library. To be plugged in any project

Notifications You must be signed in to change notification settings

varung-optimus/emails-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Input

Emails input component to allow users to be able to create fancy chip style email input


Emails input component to allow users to be able to create fancy chip style email input

Demo -> Show me what you got

Demo Link

Download & Installation

$ npm i emails-input

List of features

  • Supported on:
  • Easily create a chip style email input in vanilla project
  • Quick & Easy installation using npm
  • Customizable events to create chip - blur, enter, comma, space
  • Ability to replace/copy the existing long list to the input
  • Subscribe/Listen to value changes of the input

Code Demo

Load the script

<script type="text/javascript" src="node_modules/emails-input/dist/main.js"></script>

e.g. If you want to use emails-input with below element - emails-input

<div id="emails-input"></div>
var emailInput = new EmailInput(document.getElementById('emails-input'), { textElementClasses: 'form-control', domain: '@miro.com' });
emailInput.listenToChanges(() => {
    console.log('listened');
});
emailInput.addEmail();
emailInput.addEmail();
emailInput.addEmail();
emailInput.replaceEmails(['something@something.com', 'me@me.com', 'do@something.com']);

Contributing

Keep it simple. Keep it minimal. Don't put every single feature just because you can.

Authors or Acknowledgments

  • Varun Goel