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

auto-complete-tags

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-complete-tags

lightweight, efficient auto-complete-tags input

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Auto complete tags

A custom web component that will fetch tag suggestions from an endpoint:


<form method="post" action="/post.php">
    <auto-complete-tags
        data-wait="500" 
        data-url="/tags.php?search=" 
        data-complete-keys="Enter"
        name="tags" 
        value="grey, blue, ">
    </auto-complete-tags>
    <input type="submit" name="submit" value="send" />
</form>
<script type="module">

    import {AutoCompleteTags} from 'https://unpkg.com/auto-complete-tags@1.0.1/index.js';
    customElements.define('auto-complete-tags', AutoCompleteTags);

</script>

Options

data-wait specifies how many milli-seconds to wait before fetching data from the endpoint

data-url is the endpoint. This should return a JSON array which will build the dropdown selection list.

Your current keyboard typings will be added to the data-url and sent to the endpoint

data-complete-keys is the keys that will auto-complete the selection. ArrowUp and ArrowDown are used for moving up and down.

Styling

It is an open element, not using shadow-DOM, so you can style it from the outside. Just use a stylesheet.

Demo

See: index.html

You can see the demo here https://diversen.github.io/auto-complete-tags/

License

MIT © Dennis Iversen

Keywords

FAQs

Package last updated on 07 Nov 2021

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