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

@anthonygore/vue3-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anthonygore/vue3-autocomplete

## Table of contents

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue3-autocomplete

Table of contents

  • Installation
  • Usage

Installation

Using npm

npm install vue3-autocomplete

Using yarn

yarn add vue3-autocomplete

Usage

Load the component globally...

import App from './App.vue' // Or whatever you need
import Autocomplete from 'vue3-autocomplete'
// Optional: Import default CSS
import 'vue3-autocomplete/dist/vue3-autocomplete.css'

let app = createApp(App)
app.component('Autocomplete', Autocomplete)
app.mount('#app')

... Or locally into your component.

import Autocomplete from 'vue3-autocomplete'
// Optional: Import default CSS
import 'vue3-autocomplete/dist/vue3-autocomplete.css'

export default {
    name: 'YourComponentName',
    components: {
        Autocomplete
    }
}

Use the component into your template.

<template>
    <div>
        <Autocomplete
            @input="getItems"
            :results="items"
        ></Autocomplete>
    </div>
</template>

Properties

PropertyTypeDescriptionRequiredDefault
resultsArrayItems to display in the results listNo[]
display-itemFunctionDescribes how to render each item in resultsNoreturn item.name
debounceIntegerTime to wait before each call to the @input eventNo0
maxIntegerDefine a render limit for results itemsNo10
placeholderStringDefault input placeholderNo''
use-html-for-resultsBooleanIf true, displayItem method will display results as htmlNofalse
input-classArrayOverride input default classesNo[]
results-container-classArrayOverride results container default classesNo[]
results-item-classArrayOverride results item default classesNo[]

Events

EventDescription
@inputTriggered on user input, should update the local results list
@onSelectTriggered when user click on a list item and return the selected item

License

MIT

Keywords

FAQs

Package last updated on 10 May 2022

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