usa-state-list
Included in this page is the HTML select/dropdown code snippets to generate a list of states for the United States. The list uses the USPS state abbreviation values. A list of outlying territories and armed forces USPS entries are also available
[ This description is mirrored from README.md at github.com/biztek/Usa-state-list on 2018-12-05 ]
usa-state-list
is similar to a native browser select element.
usa-state-list
works with selectable content. The currently selected
item is displayed in the control. If no item is selected, the label
is
displayed instead.
State drop down list that will include states, outlying territories, armed forces. Example: It includes an optional label, error message, invalid, autovalidate and required attributes.
<usa-state-list file-name="jsonFile"></usa-state-list>
<usa-state-list label="label"></usa-state-list>
<usa-state-list error-message="state is required"></usa-state-list>
<usa-state-list invalid="boolean value"></usa-state-list>
<usa-state-list autoValidate="boolean value"></usa-state-list>
<usa-state-list required="boolean value"></usa-state-list>
Validation
If the auto-validate
attribute is set, element validates when the user not select the state from dropdown menu.
Install
Install the component using Bower:
bower install --save biztek/usa-state-list
Usage
Import Custom Element:
<link rel="import" href="bower_components/usa-state-list/usa-state-list.html">
And then use it:
<usa-state-list file-name="jsonFile"></usa-state-list>
Contributing
- Fork it!
- Create your feature branch:
git checkout -b usa-state-list
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push -u origin usa-state-list
- Submit a pull request
License
Licensed under the Apache 2.0.
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
Polymer/polymer#^1.7.0
- PolymerElements/paper-dropdown-menu#^1.4.1
- PolymerElements/paper-listbox#^1.1.2
- PolymerElements/paper-item#^1.2.1
- Released
- 2017-09-08
- Maturity
- IMPORTED
- License
- Other
Compatibility
- Framework
- Polymer 1.0+
- Browser
- Browser Independent