2.0.10 • Published 1 year ago

@uxland/autocomplete v2.0.10

Weekly downloads
44
License
-
Repository
github
Last release
1 year ago

\<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
2.0.9

1 year ago

2.0.10

1 year ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.3

4 years ago

2.0.4

4 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

2.0.0-beta.1

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago