npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@romanmarochkin/vue3-autocomplete

v1.0.7

Published

Simple autocomplete field for vue3 and nuxt3. Tags, async loading list, dynamic, async, dropdown list.

Downloads

6

Readme

Vue 3 autocomplete

This is a simple library that allows you to input tags into a field, outputting an array. There's the option to disable duplication, asynchronous loading of lists, control props, and much more.

Vue 3 autocomplete

You can use "tab", "enter", "," to complete tag. And up/down arrow to navigate on list (enter press on list complete tag). Press backspace (if input empty) or click on cross, to remove a tag.

Installing

import vueAutocomplete from "@venegrad/vue3-autocomplete"

export default {
  components: {
    vueAutocomplete
  },
}

Css if needed:

@import '@venegrad/vue3-autocomplete/dist/venAutocomplete.css'

Props

  • list: (Array, ['John', 'Doe']), Default = empty, List of tags for autocomplete.
  • disabledSymbols: (String, "#!=&)(/"), Default = null, List in string of disabled symbols or letters.
  • min: (Number, 1), Default = 1, Minimum length for 1 tag.
  • max: (Number, 1), Default = 200, Maximum length for 1 tag.
  • dublicates: (Boolean, false), Default = false, Available of disable dublcate tags.
  • placeholder: (String, "Start typing"), Default = null, Placeholder for input tag
  • v-model: v-model value (Array, ['John', 'Doe']), Dynamic v-model value

Events

All you need to do is attach a watch event to the v-model value, but if that's not enough for you, I've added a few more events.

  • @inputEvent = return value of input field, when user typing or pasting something.
  • @changed = return value of v-model when inner array or v-model changed. Starts first time on components mount, and every time when v-model changed.
  • @open = return dropdown trigger, opened or closed.

Open and Close from your component

<template>
   <ven-autocomplete ref="ggauto" />
</template>

<script setup>
const ggauto = ref()

onMouted(() => {
  ggauto.value.goOpen();
  setTimeout(() => {
    ggauto.value.goClose();
  }, 5000)
})

</script>

Simple example

<venAutocomplete
  :list="list"
  placeholder="Write something, and press ',' or 'enter' or 'tab'"
  disabled-symbols="#!=&)(/"
  :max="30"
  :min="3"
  :dublicates="true"
  v-model="vvalue"
  @inputEvent="inputEvent"
  @changed="changed"
  @opened="opened"
/>

Help links:

  • If my solution was helpful to you, please give me a star on Github or get my day better with:
  • USDT TRC20: TKXybH3YoFvT5h8bQFLdkDBtiXA65y7xaB
  • USDT ERC20: 0xc3efeB4825E350eE5D6B032Aa1dE144B09B5bB0D