1.0.0-alpha.30 • Published 3 years ago

@talixo/address-input v1.0.0-alpha.30

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Talixo AddressInput

UI Component which represents AddressInput

How to install

Package is available as @talixo/address-input in NPM registry, so you can use it in your project using npm install @talixo/address-input --save or yarn add @talixo/address-input.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/address: ^1.0.0-alpha.30
  • @talixo/button: ^1.0.0-alpha.30
  • @talixo/combo-box: ^1.0.0-alpha.30
  • @talixo/device-swap: ^1.0.0-alpha.30
  • @talixo/icon: ^1.0.0-alpha.30
  • @talixo/masked-input: ^1.0.0-alpha.30
  • @talixo/progress-ring: ^1.0.0-alpha.30
  • @talixo/shared: ^1.0.0-alpha.30
  • @talixo/text-input: ^1.0.0-alpha.30
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0

These packages are required by @talixo/address-input, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

Address Input

Property nameTypeDefaultDescription
classNamestringn/aAddress of location.
footernoden/aAutoComplete list footer.
labelstringn/aMobile view input label.
loadingbooleann/aIndicates if loader should be displayed inside input.
locationsLocation[]n/aLocations to be displayed inside AutoComlete.
onBlurfunctionn/aonBlur callback.
onChangefunctionn/aonChange callback.
onFocusfunctionn/aonFocus callback.
onLoadRequestfunctionn/aThis function is called when changes input value, at has typed in at least 3 letters. It can be used to load locations from external API.
onStopRequestfunctionn/aThis function is called when changes input value, at has typed less than 3 letters.
placeholderstringn/aAddressInput placeholder.
minLettersnumber3Minimum number of letters to request load/stop procedure.
writingDelaynumber300Debounce delay (in milliseconds) for writing, to not request load procedure.
mobileFriendlybooleantrueShould it try to show it better way on mobile?
renderAddressfunction(props) => <Address {...props} />Address component which will be displayed inside autocomplete list.
valueLocationn/aChosen location value.

Property shapes

Location

Property nameTypeDefaultDescription
addressstringn/aBasic address information.
detailsstringn/aAdditional information about place.
typestringn/aAddress type to determine icon displayed next to the address.
metaMetan/aMetadata of location.
shortstringn/aPlace name abbreviation. It can be e.g. IATA code of an airport.

Meta

Property nameTypeDefaultDescription
descriptionstringn/aDescription of a place. If provided it will be displayed inside AddressInput.

Changelog

  • 0.1.0 - initial version
1.0.0-alpha.38

3 years ago

1.0.0-alpha.37

3 years ago

1.0.0-alpha.36

3 years ago

1.0.0-alpha.35

3 years ago

1.0.0-alpha.33

3 years ago

1.0.0-alpha.32

3 years ago

1.0.0-alpha.31

3 years ago

1.0.0-alpha.30

3 years ago