OLD | NEW |
| (Empty) |
1 | |
2 <!--- | |
3 | |
4 This README is automatically generated from the comments in these files: | |
5 paper-dropdown-menu.html | |
6 | |
7 Edit those files, and our readme bot will duplicate them over here! | |
8 Edit this file, and the bot will squash your changes :) | |
9 | |
10 The bot does some handling of markdown. Please file a bug if it does the wrong | |
11 thing! https://github.com/PolymerLabs/tedium/issues | |
12 | |
13 --> | |
14 | |
15 [](https://travis-ci.org/PolymerElements/paper-dropdown-menu) | |
16 | |
17 _[Demo and API Docs](https://elements.polymer-project.org/elements/paper-dropdow
n-menu)_ | |
18 | |
19 | |
20 ##<paper-dropdown-menu> | |
21 | |
22 Material design: [Dropdown menus](https://www.google.com/design/spec/components/
buttons.html#buttons-dropdown-buttons) | |
23 | |
24 `paper-dropdown-menu` is similar to a native browser select element. | |
25 `paper-dropdown-menu` works with selectable content. The currently selected | |
26 item is displayed in the control. If no item is selected, the `label` is | |
27 displayed instead. | |
28 | |
29 The child element with the class `dropdown-content` will be used as the dropdown | |
30 menu. It could be a `paper-menu` or element that triggers `iron-select` when | |
31 selecting its children. | |
32 | |
33 Example: | |
34 | |
35 ```html | |
36 <paper-dropdown-menu label="Your favourite pastry"> | |
37 <paper-menu class="dropdown-content"> | |
38 <paper-item>Croissant</paper-item> | |
39 <paper-item>Donut</paper-item> | |
40 <paper-item>Financier</paper-item> | |
41 <paper-item>Madeleine</paper-item> | |
42 </paper-menu> | |
43 </paper-dropdown-menu> | |
44 ``` | |
45 | |
46 This example renders a dropdown menu with 4 options. | |
47 | |
48 Similarly to using `iron-select`, `iron-deselect` events will cause the | |
49 current selection of the `paper-dropdown-menu` to be cleared. | |
50 | |
51 ### Styling | |
52 | |
53 The following custom properties and mixins are also available for styling: | |
54 | |
55 | Custom property | Description | Default | | |
56 | --- | --- | --- | | |
57 | `--paper-dropdown-menu` | A mixin that is applied to the element host | `{}` | | |
58 | `--paper-dropdown-menu-disabled` | A mixin that is applied to the element host
when disabled | `{}` | | |
59 | `--paper-dropdown-menu-ripple` | A mixin that is applied to the internal rippl
e | `{}` | | |
60 | `--paper-dropdown-menu-button` | A mixin that is applied to the internal menu
button | `{}` | | |
61 | `--paper-dropdown-menu-input` | A mixin that is applied to the internal paper
input | `{}` | | |
62 | `--paper-dropdown-menu-icon` | A mixin that is applied to the internal icon |
`{}` | | |
63 | |
64 You can also use any of the `paper-input-container` and `paper-menu-button` | |
65 style mixins and custom properties to style the internal input and menu button | |
66 respectively. | |
67 | |
68 | |
OLD | NEW |