@18f/identity-address-search

3.1.1 • Public • Published

@18f/identity-address-search

This is a npm module that provides a React UI component to search for USPS (United States Postal Service) locations. It allows you to retrieve USPS location information based on a full address.

Additionally, this module depends on existing backend services from the Login.gov project. Make sure to have the required backend services or mock services set up and running before using this module.

Installation

You can install this module using npm:

npm install @18f/identity-address-search

Requires React version 17 or greater.

Requires @18f/identity-i18n.

Usage

To use this component, provide callbacks to it for desired behaviors.

import AddressSearch from '@18f/identity-address-search';

// Render UI component

return(
    <>
    <AddressSearch
            addressSearchURL={addressSearchURL}
            disabled={disabledAddressSearchCallback}
            handleLocationSelect={handleLocationSelect}
            locationsURL={LOCATIONS_URL}
            noInPersonLocationsDisplay={noInPersonLocationsDisplay}
            onFoundLocations={setLocationResultsCallback}
            registerField={registerFieldCallback}
            resultsHeaderComponent={resultsHeaderComponent}
          />
    </>
);

License

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.

Readme

Keywords

none

Package Sidebar

Install

npm i @18f/identity-address-search

Weekly Downloads

11

Version

3.1.1

License

CC0-1.0

Unpacked Size

81.5 kB

Total Files

4

Last publish

Collaborators

  • ginayam
  • sb-nava
  • cvfergus
  • mneveunava
  • nava-matt
  • tts-tech-portfolio
  • 18f-devops
  • mgwalker
  • stvnrlly
  • rori123
  • aduth