Name: paper-listbox
Owner: PolymerElements
Description: null
Created: 2015-10-14 00:31:15.0
Updated: 2018-04-12 22:08:36.0
Pushed: 2018-05-23 02:36:43.0
Homepage: https://www.webcomponents.org/element/PolymerElements/paper-listbox
Size: 97
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Material design: Menus
<paper-listbox>
implements an accessible listbox control with Material Design styling. The focused item
is highlighted, and the selected item has bolded text.
er-listbox>
aper-item>Item 1</paper-item>
aper-item>Item 2</paper-item>
per-listbox>
An initial selection can be specified with the selected
attribute.
er-listbox selected="0">
aper-item>Item 1</paper-item>
aper-item>Item 2</paper-item>
per-listbox>
Make a multi-select listbox with the multi
attribute. Items in a multi-select listbox can be deselected,
and multiple item can be selected.
er-listbox multi>
aper-item>Item 1</paper-item>
aper-item>Item 2</paper-item>
per-listbox>
The following custom properties and mixins are available for styling:
| Custom property | Description | Default |
| — | — | — |
| --paper-listbox-background-color
| Menu background color | --primary-background-color
|
| --paper-listbox-color
| Menu foreground color | --primary-text-color
|
| --paper-listbox
| Mixin applied to the listbox | {}
|
<paper-listbox>
has role="listbox"
by default. A multi-select listbox will also have
aria-multiselectable
set. It implements key bindings to navigate through the listbox with the up and
down arrow keys, esc to exit the listbox, and enter to activate a listbox item. Typing the first letter
of a listbox item will also focus it.
IronSelectableBehavior and IronMultiSelectableBehavior, which are used by paper-listbox, introduce multiple breaking changes. Please see the README for those behaviors for more detail.