@songhay/input-autocomplete
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@songhay/input-autocomplete

npm version

Published on webcomponents.org

an HTML input element with auto-complete functionality

Here is a sample declaration of this Web Component from the mocha test harness:

<rx-input-autocomplete
    inputId="my-input"
    maxSuggestions="5"
    minInput="0"
    placeholder="enter here">
</rx-input-autocomplete>

Styling depends on CSS Variables also summarized in the test harness:

<style>
    :root {
        --input-autocomplete-width: 16em;
        --input-autocomplete-z-index: 1;
        --input-autocomplete-suggestion-border: none;
        --input-autocomplete-suggestion-font-weight: normal;
        --input-autocomplete-suggestion-margin: 0;
        --input-autocomplete-suggestion-text-align: left;
        --input-autocomplete-suggestion-text-overflow: ellipses;
        --input-autocomplete-suggestion-selected-background-color: #e2e2e2;
        --input-autocomplete-suggestion-selected-border: solid #f00;
        --input-autocomplete-suggestion-selected-font-weight: bold;
    }
</style>

The values of these variables are the defaults set by this Web Component.

component animated demo

📚 typedoc documentation is available.

@BryanWilhite

Package Sidebar

Install

npm i @songhay/input-autocomplete

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

113 kB

Total Files

42

Last publish

Collaborators

  • rasx