3
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
Code distributed by Google as part of the polymer project is also
8
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
11
<link rel="import" href="../polymer/polymer.html">
12
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
13
<link rel="import" href="paper-item-behavior.html">
14
<link rel="import" href="paper-item-shared-styles.html">
17
Material design: [Lists](https://www.google.com/design/spec/components/lists.html)
19
`<paper-item>` is an interactive list item. By default, it is a horizontal flexbox.
21
<paper-item>Item</paper-item>
23
Use this element with `<paper-item-body>` to make Material Design styled two-line and three-line
27
<paper-item-body two-line>
28
<div>Show your status</div>
29
<div secondary>Your status is visible to everyone</div>
31
<iron-icon icon="warning"></iron-icon>
34
To use `paper-item` as a link, wrap it in an anchor tag. Since `paper-item` will
35
already receive focus, you may want to prevent the anchor tag from receiving
36
focus as well by setting its tabindex to -1.
38
<a href="https://www.polymer-project.org/" tabindex="-1">
39
<paper-item raised>Polymer Project</paper-item>
42
If you are concerned about performance and want to use `paper-item` in a `paper-listbox`
43
with many items, you can just use a native `button` with the `paper-item` class
44
applied (provided you have correctly included the shared styles):
46
<style is="custom-style" include="paper-item-shared-styles"></style>
49
<button class="paper-item" role="option">Inbox</button>
50
<button class="paper-item" role="option">Starred</button>
51
<button class="paper-item" role="option">Sent mail</button>
56
The following custom properties and mixins are available for styling:
58
Custom property | Description | Default
59
------------------------------|----------------------------------------------|----------
60
`--paper-item-min-height` | Minimum height of the item | `48px`
61
`--paper-item` | Mixin applied to the item | `{}`
62
`--paper-item-selected-weight`| The font weight of a selected item | `bold`
63
`--paper-item-selected` | Mixin applied to selected paper-items | `{}`
64
`--paper-item-disabled-color` | The color for disabled paper-items | `--disabled-text-color`
65
`--paper-item-disabled` | Mixin applied to disabled paper-items | `{}`
66
`--paper-item-focused` | Mixin applied to focused paper-items | `{}`
67
`--paper-item-focused-before` | Mixin applied to :before focused paper-items | `{}`
71
This element has `role="listitem"` by default. Depending on usage, it may be more appropriate to set
72
`role="menuitem"`, `role="menuitemcheckbox"` or `role="menuitemradio"`.
74
<paper-item role="menuitemcheckbox">
78
<paper-checkbox></paper-checkbox>
86
<dom-module id="paper-item">
88
<style include="paper-item-shared-styles"></style>
91
@apply(--layout-horizontal);
92
@apply(--layout-center);
93
@apply(--paper-font-subhead);
107
Polymer.PaperItemBehavior