
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
html-autocomplete
Advanced tools
A very light weight html/javascript autocomplete component. This component was built using StencilJs.
This component works in pure HTML pages regardless of the framework you are using.
##Demo Click here to view demo..
###HTML Import the javascript file the head tag of the page.
<head>
<script type="module" src="https://unpkg.com/html-autocomplete@[version]/dist/html-autocomplete/html-autocomplete.esm.js"></script>
<script nomodule="" src="https://unpkg.com/html-autocomplete@[version]/dist/html-autocomplete/html-autocomplete.js"></script>
...
</head>
Add the autocomplete tag
<!--where suggestions is the list of your objects-->
<html-autocomplete placeholder="Search" mode="material" suggestions="suggestions" (itemSelected)="fuction($event)">
</html-autocomplate>
###NPM
npm i html-autocomplete --save
####Import component In you main file, add the following lines
import { defineCustomElements } from 'html-autocomplete/loader';
...
defineCustomElements(window);
Add the autocomplete tag
<!--where suggestions is the list of your objects-->
<html-autocomplete placeholder="Search" mode="material" suggestions="suggestions" (itemSelected)="fuction($event)">
</html-autocomplate>
####Angular/Ionic Only
@NgModule({
declarations: [
...
],
imports: [
...
],
providers: [
...
],
schemas: [CUSTOM_ELEMENTS_SCHEMA], // Add this line
bootstrap: [AppComponent]
})
| Name | Type | Default | Description |
|---|---|---|---|
| suggestions | any[] | null | List to search |
| labelField | string | 'name' | Label property |
| idField | string | 'id' | Id property |
| placeholder | string | 'Search' | Placeholder |
| value | string | '' | Original value of input |
| mode | string | 'material' | mode (material or bootstrap |
| readonly | boolean | false | Disable component |
| imagePathField | string | null | The field of the image path. if this field is filled, images will appear at the start of each item. |
| direction | string | 'ltr' | direction (ltr or rtl) |
| Name | Type | Description |
|---|---|---|
| itemSelected | EventEmitter | Item Selected |
| Name | value | Description |
|---|---|---|
| --width | 100% | Width of the input |
| --color | #000000 | Color inside input |
| --label-color | #000000 | Label Color (material) |
| --label-color-focus | #2196f3 | Label Color when focus (material) |
| --border-color | #c6c6c6 | Color of border |
| --border-color-focus | #2196f3 | Color of border on focus |
| --font-size | 18px | Font size |
| --label-font-size | 16px | Label font size (material) |
| --label-font-size-focus | 12px | label font size focus(material) |
| --margin-top | 16px | Top margin |
| --margin-bottom | 16px | Bottom margin |
| --margin-left | 16px | Left margin |
| --margin-right | 16px | Right margin |
| --suggestions-background | #fff | Background of suggestions |
| --suggestions-color | #000000 | Text color of suggestions |
| --image-width | 30px | Width of the images |
| --image-height | 30px | Height of the images |
FAQs
Stencil Component Starter
The npm package html-autocomplete receives a total of 14 weekly downloads. As such, html-autocomplete popularity was classified as not popular.
We found that html-autocomplete 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.