Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uxland/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uxland/autocomplete

UXLand - Autocomplete component

  • 2.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

<uxl-autocomplete>

What is?

It is a web component that allows you to create a autocomplete and customizable selector.

How Install
npm i --save @uxland/autocomplete
How to use?

import the component and use it in the html with the uxl-autocomplete tag

import "@uxland/autocomplete";

<body>
    <uxl-autocomplete></uxl-autocomplete>
</body>

Attributes availables

AttributeDescriptionDefault
idid for uxl-autocomplete inputuxl-autocomplete (string)
listlist of options available to select in the component[] (any[])
trackBylist of fields of the list items enabled to search by them["value", "name"] (string[])
labelslist of fields enabled to be displayed in the list items["value", "name"] (string[])
placeholderinput placeholderType to search (string)
notFoundMessagemessage displayed when not finding results by the entered valueElements not found (string)
termtext entered in the input used to filter the elements of the list"" (string)
valuethe current value of the selected list itemundefined (any)
listIsVisibleallow show or hide the drop-downfalse (boolean)
maxItemshow many elements will be displayed as maximum in the drop-down10 (number)
disabledif true the imput don't allow select any optionfalse (boolean)

Styling

The following custom properties and mixins are available for styling:

Custom propertyDescriptionDefault
Input
--uxl-autocomplete-border-colorBorder styles of the input1px solid #d8d8d8
--uxl-autocomplete--border-radiusBorder-radius of the input4px
--uxl-autocomplete-heightHeight of the input32px
--uxl-autocomplete-paddingPadding of the input8px
--uxl-autocomplete-font-sizeFont size of the input12px
--uxl-autocomplete-colorColor of the input text#000000
--uxl-autocomplete-font-weightFont-weigth of the input text500
--uxl-autocomplete-disabled-opacityOpacity of the input when is disabled0.5
Drop-down
--uxl-autocomplete-drop-down-borderBorder styles of the drop-down1px solid #d8d8d8
--uxl-autocomplete-drop-down-paddingPadding of the dropdown16px
--uxl-autocomplete-drop-down-list--max-heightMax heigth of the listnone
Main element
--uxl-autocomplete-drop-down-item-paddingPadding of the main element of the drop-down item8px 0px
--uxl-autocomplete-drop-down-item-font-sizeFont size of the main element of the drop-down item12px
--uxl-autocomplete-drop-down-item-colorColor text of the main element of the drop-down item#000000
--uxl-autocomplete-drop-down-item-font-weightFont-weigth of the main element of the drop-down item500
Secondary element
--uxl-autocomplete-drop-down-secondary-item-paddingPadding of the secondary element of the drop-down item8px 0px
--uxl-autocomplete-drop-down-secondary-item-font-sizeFont size of the secondary element of the drop-down item12px
--uxl-autocomplete-drop-down-secondary-item-colorColor text of the secondary element of the drop-down item#979797
--uxl-autocomplete-drop-down-secondary-item-font-weightFont-weight of the secondary element of the drop-down item300
Matching text
--uxl-autocomplete-drop-down-hightlight-font-weigthFont-weigth of the text matching the search600
--uxl-autocomplete-drop-down-hightlight-colorColor of the text matching the search#000000
Not found text
--uxl-autocomplete-not-found-paddingPadding of the not found message container8px 0px
--uxl-autocomplete-not-found-font-sizeFont size of the not found message12px
--uxl-autocomplete-not-found-colorColor of the not found message#000000
--uxl-autocomplete-not-found-font-weightFont-weight of not found message500

Events

The following events are available to listen

EventsDescription
uxl-autocomplete-term-changedThe term inserted in the input field has changed
uxl-autocomplete-value-changedThe selected item has changed
uxl-autocomplete-list-changedThe main list of options has changed
uxl-autocomplete-trackBy-changedThe track by field has changed
uxl-autocomplete-listIsVisible-changedThe visibility of the list options changed
uxl-autocomplete-disabled-changedThe availability of the input changed

Keywords

FAQs

Package last updated on 17 Jan 2023

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