Gathering detailed insights and metrics for @polymer/paper-listbox
Gathering detailed insights and metrics for @polymer/paper-listbox
Gathering detailed insights and metrics for @polymer/paper-listbox
Gathering detailed insights and metrics for @polymer/paper-listbox
npm install @polymer/paper-listbox
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
21 Stars
139 Commits
16 Forks
17 Watching
15 Branches
26 Contributors
Updated on 29 Apr 2022
Minified
Minified + Gzipped
HTML (52.12%)
JavaScript (47.88%)
Cumulative downloads
Total Downloads
Last day
21.1%
1,816
Compared to previous day
Last week
8%
11,133
Compared to previous week
Last month
-10.7%
46,246
Compared to previous month
Last year
0.8%
606,936
Compared to previous year
<paper-listbox>
implements an accessible listbox control with Material Design styling. The focused item
is highlighted, and the selected item has bolded text.
1<paper-listbox> 2 <paper-item>Item 1</paper-item> 3 <paper-item>Item 2</paper-item> 4</paper-listbox>
An initial selection can be specified with the selected
attribute.
1<paper-listbox selected="0"> 2 <paper-item>Item 1</paper-item> 3 <paper-item>Item 2</paper-item> 4</paper-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.
1<paper-listbox multi> 2 <paper-item>Item 1</paper-item> 3 <paper-item>Item 2</paper-item> 4</paper-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.
See: Documentation, Demo.
npm install --save @polymer/paper-listbox
1<html> 2 <head> 3 <script type="module"> 4 import '@polymer/paper-listbox/paper-listbox.js'; 5 </script> 6 </head> 7 <body> 8 <paper-listbox> 9 <div role="option">item 1</div> 10 <div role="option">item 2</div> 11 <div role="option">item 3</div> 12 </paper-listbox> 13 </body> 14</html>
1import {PolymerElement, html} from '@polymer/polymer'; 2import '@polymer/paper-listbox/paper-listbox.js'; 3 4class SampleElement extends PolymerElement { 5 static get template() { 6 return html` 7 <paper-listbox> 8 <div role="option">item 1</div> 9 <div role="option">item 2</div> 10 <div role="option">item 3</div> 11 </paper-listbox> 12 `; 13 } 14} 15customElements.define('sample-element', SampleElement);
If you want to send a PR to this element, here are the instructions for running the tests and demo locally:
1git clone https://github.com/PolymerElements/paper-listbox 2cd paper-listbox 3npm install 4npm install -g polymer-cli
1polymer serve --npm 2open http://127.0.0.1:<port>/demo/
1polymer test --npm
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 3/24 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
29 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More