Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue3-simple-typeahead
Advanced tools
Simple Vue3 typeahead component that show a suggested list of elements while the user types in.
A Vue3 component for a simple typeahead component. It will show a list of suggested items based on the user input.
The component includes it's own input and when the user types on it (at least two characters) the suggested options appear.
//Pending
npm install vue3-simple-typeahead
You can also use the browser bundle in a script tag.
<script src="https://unpkg.com/vue3-simple-typeahead"></script>
Import the vue3-simple-typeahead component and register it globally in your Vue app. Import the CSS as well if you wish to use the default styling.
import { createApp } from 'vue';
import App from './App.vue';
import SimpleTypeahead from 'vue3-simple-typeahead';
import 'vue3-simple-typeahead/dist/vue3-simple-typeahead.css'; //Optional default CSS
let app = createApp(App);
app.use(SimpleTypeahead);
app.mount('#app');
You can also import vue3-simple-typeahead locally in your component if you prefer.
import SimpleTypeahead from 'vue3-simple-typeahead'
import 'vue3-simple-typeahead/dist/vue3-simple-typeahead.css' //Optional default CSS
export default {
name: 'my-vue-component',
...
components: {
SimpleTypeahead
}
...
}
Then, use the component in your app.
<vue3-simple-typeahead
id="typeahead_id"
placeholder="Start writing..."
:items="['One','Two','Three',...]"
@selectItem="selectItemEventHandler"
@onInput="onInputEventHandler"
@onFocus="onInputEventHandler"
@onBlur="onInputEventHandler"
>
</vue3-simple-typeahead>
Prop | Type | Default | Description |
---|---|---|---|
id | String | Random id generation | The id for the input control. Can be useful to link with a label for="" |
placeholder | String | '' | Placeholder text for the input |
items | Array (Required) | List of strings with the elements for suggestions |
Event | Signature | Description |
---|---|---|
selectItem | function (item: String): void | Emitted when the user selects an item from the suggestion list |
onInput | function (input: String): void | Emitted when the user types anything |
onFocus | function (input: String): void | Emitted when the input control get the focus |
onBlur | function (input: String): void | Emitted when the input control lost the focus [When the user select an item, the focus is lost too] |
FAQs
A simple and lightweight Vue3 typeahead component that show a suggested list of elements while the user types in.
The npm package vue3-simple-typeahead receives a total of 3,978 weekly downloads. As such, vue3-simple-typeahead popularity was classified as popular.
We found that vue3-simple-typeahead demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.