2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
11 `core-menu` is a selector which styles to looks like a menu.
13 <core-menu selected="0">
14 <core-item icon="settings" label="Settings"></core-item>
15 <core-item icon="dialog" label="Dialog"></core-item>
16 <core-item icon="search" label="Search"></core-item>
19 When an item is selected the `core-selected` class is added to it. The user can
20 use the class to add more stylings to the selected item.
22 core-item.core-selected {
26 The `selectedItem` property references the selected item.
28 <core-menu selected="0" selectedItem="{{item}}">
29 <core-item icon="settings" label="Settings"></core-item>
30 <core-item icon="dialog" label="Dialog"></core-item>
31 <core-item icon="search" label="Search"></core-item>
34 <div>selected label: {{item.label}}</div>
36 The `core-select` event signals selection change.
38 <core-menu selected="0" on-core-select="{{selectAction}}">
39 <core-item icon="settings" label="Settings"></core-item>
40 <core-item icon="dialog" label="Dialog"></core-item>
41 <core-item icon="search" label="Search"></core-item>
46 selectAction: function(e, detail) {
47 if (detail.isSelected) {
48 var selectedItem = detail.item;
53 @group Polymer Core Elements
55 @extends core-selector
58 <link rel=
"import" href=
"../core-selector/core-selector.html">
60 <polymer-element name=
"core-menu" extends=
"core-selector" noscript
>
63 <link rel=
"stylesheet" href=
"core-menu.css">