🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

vue-email-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-email-dropdown

A Vue component for autocomplete email domains

Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
793
-6.6%
Maintainers
1
Weekly downloads
 
Created
Source

vue-email-dropdown

A Vue component for autocomplete email domains

Build Status

Features

  • Allows passing a list of domains to be used in for the suggestions.
  • Allows passing a list of default domains that are going to be used when type @.
  • Closes the list by pressing Esc.
  • Allows the navigate the list by pressing Up / Down.
  • Closes the list on click outside.
  • Allows configuring the list size.

Demo

Edit Demo vue-email-dropdown

Demo

Props

PropTypeRequiredDefaultDescription
domainsArrayTrue-All domains that should be used to make a domain suggestions.
defaultDomainsArrayFalse[]Default domains that should be displayed once `@` is typed.
initialValueStringFalse""Initial value for the email field.
maxSuggestionsNumberFalse4How many domain suggestions should displayed.
closeOnClickOutsideBooleanFalsetrueHide the suggestion list if you click outside the list.
inputClassesString|Array|ObjectFalse""Classes that will be apply to the email input.

Installation

npm install vue-email-dropdown --save

# or with yarn

yarn add vue-email-dropdown

Usage

<template>
  <EmailDropdown :domains="domains" :defaultDomains="defaultDomains" />
</template>

<script>
// Import package
import EmailDropdown from "vue-email-dropdown";
// Import styles
import "vue-email-dropdown/dist/vue-email-dropdown.css";

export default {
  components: {
    EmailDropdown
  },
  data() {
    return {
      domains: [
        "yourcompany.com",
        "google.com",
        "gmx.de",
        "googlemail.com",
        "hotmail.fr",
        "hotmail.it",
        "web.de",
        "yahoo.co.in",
        "yahoo.com",
        "yahoo.in"
      ],
      defaultDomains: ["gmail.com", "hotmail.com", "msn.com", "outlook.com", "yahoo.com"]
    };
  }
};
</script>

Development setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your unit tests

npm run test

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Contributing

Keywords

vue

FAQs

Package last updated on 05 Dec 2019

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