New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-email-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-email-autocomplete

Autocomplete React component for email fields

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
632
increased by5.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Email Autocomplete

An autocomplete React component for email fields inspired by Auto-Email JQuery plugin

Todo

  • Improve the speed and performance

Usage

To use this component, you should install it by npm:

$ npm install react-email-autocomplete --save-dev

And then use the component like bellow example(Bootstrap control):

import React, { Component } from 'react';
import Email from 'react-email-autocomplete';

class App extends Component {
  render() {
    return (
      <div className="form-group">
        <label htmlFor="eac-input">Email address</label> 
        <Email className="form-control" placeholder="Enter email"/>
      </div>
    )
  }
}

export default App;

Also you can pass a list as your custom domains:

class App extends Component {
  render() {
    const customDomains = ['yourdomain.com', 'yourdomain2.com', 'gmail.com', 'yahoo.com']
    return (
      <div className="form-group">
        <label htmlFor="eac-input">Email address</label> 
        <Email className="form-control" placeholder="Enter email" domains={customDomains}/>
      </div>
    )
  }
}

The method accepts two parameters, domains and multi-enabled.

  • domains is an array of domains to autocomplete with, autocompleting on the first match in the array. Typing joe@f in the above example will first autocomplete to joe@foo.org. After the user types joe@foob, the field will autocomplete to joe@foobar.com.
  • multi-enabled is a boolean flag that enables the user to enter multiple emails in the field, separated by a , or ;

License

This software is released under the MIT License.

Keywords

FAQs

Package last updated on 06 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc