| OLD | NEW |
| 1 | 1 |
| 2 <!--- | 2 <!--- |
| 3 | 3 |
| 4 This README is automatically generated from the comments in these files: | 4 This README is automatically generated from the comments in these files: |
| 5 paper-tab.html paper-tabs.html | 5 paper-tab.html paper-tabs.html |
| 6 | 6 |
| 7 Edit those files, and our readme bot will duplicate them over here! | 7 Edit those files, and our readme bot will duplicate them over here! |
| 8 Edit this file, and the bot will squash your changes :) | 8 Edit this file, and the bot will squash your changes :) |
| 9 | 9 |
| 10 The bot does some handling of markdown. Please file a bug if it does the wrong | 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 | 11 thing! https://github.com/PolymerLabs/tedium/issues |
| 12 | 12 |
| 13 --> | 13 --> |
| 14 | 14 |
| 15 [](https://travis-ci.org/PolymerElements/paper-tabs) | 15 [](https://travis-ci.org/PolymerElements/paper-tabs) |
| 16 | 16 |
| 17 _[Demo and API Docs](https://elements.polymer-project.org/elements/paper-tabs)_ | 17 _[Demo and API docs](https://elements.polymer-project.org/elements/paper-tabs)_ |
| 18 | 18 |
| 19 | 19 |
| 20 ##<paper-tabs> | 20 ##<paper-tabs> |
| 21 | 21 |
| 22 Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html) | 22 Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html) |
| 23 | 23 |
| 24 `paper-tabs` makes it easy to explore and switch between different views or func
tional aspects of | 24 `paper-tabs` makes it easy to explore and switch between different views or func
tional aspects of |
| 25 an app, or to browse categorized data sets. | 25 an app, or to browse categorized data sets. |
| 26 | 26 |
| 27 Use `selected` property to get or set the selected tab. | 27 Use `selected` property to get or set the selected tab. |
| 28 | 28 |
| 29 Example: | 29 Example: |
| 30 | 30 |
| 31 ```html | 31 ```html |
| 32 <paper-tabs selected="0"> | 32 <paper-tabs selected="0"> |
| 33 <paper-tab>TAB 1</paper-tab> | 33 <paper-tab>TAB 1</paper-tab> |
| 34 <paper-tab>TAB 2</paper-tab> | 34 <paper-tab>TAB 2</paper-tab> |
| 35 <paper-tab>TAB 3</paper-tab> | 35 <paper-tab>TAB 3</paper-tab> |
| 36 </paper-tabs> | 36 </paper-tabs> |
| 37 ``` | 37 ``` |
| 38 | 38 |
| 39 See <a href="#paper-tab">paper-tab</a> for more information about | 39 See <a href="?active=paper-tab">paper-tab</a> for more information about |
| 40 `paper-tab`. | 40 `paper-tab`. |
| 41 | 41 |
| 42 A common usage for `paper-tabs` is to use it along with `iron-pages` to switch | 42 A common usage for `paper-tabs` is to use it along with `iron-pages` to switch |
| 43 between different views. | 43 between different views. |
| 44 | 44 |
| 45 ```html | 45 ```html |
| 46 <paper-tabs selected="{{selected}}"> | 46 <paper-tabs selected="{{selected}}"> |
| 47 <paper-tab>Tab 1</paper-tab> | 47 <paper-tab>Tab 1</paper-tab> |
| 48 <paper-tab>Tab 2</paper-tab> | 48 <paper-tab>Tab 2</paper-tab> |
| 49 <paper-tab>Tab 3</paper-tab> | 49 <paper-tab>Tab 3</paper-tab> |
| 50 </paper-tabs> | 50 </paper-tabs> |
| 51 | 51 |
| 52 <iron-pages selected="{{selected}}"> | 52 <iron-pages selected="{{selected}}"> |
| 53 <div>Page 1</div> | 53 <div>Page 1</div> |
| 54 <div>Page 2</div> | 54 <div>Page 2</div> |
| 55 <div>Page 3</div> | 55 <div>Page 3</div> |
| 56 </iron-pages> | 56 </iron-pages> |
| 57 ``` | 57 ``` |
| 58 | 58 |
| 59 To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>` | 59 To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>` |
| 60 element in `paper-tab`. | 60 element in `paper-tab`. |
| 61 | 61 |
| 62 Example: | 62 Example: |
| 63 | 63 |
| 64 ```html | 64 <pre><code> |
| 65 <style is="custom-style"> | 65 <style is="custom-style"> |
| 66 .link { | 66 .link { |
| 67 ``` | 67 @apply(--layout-horizontal); |
| 68 @apply(--layout-center-center); |
| 69 } |
| 70 </style> |
| 71 |
| 72 <paper-tabs selected="0"> |
| 73 <paper-tab link> |
| 74 <a href="#link1" class="link">TAB ONE</a> |
| 75 </paper-tab> |
| 76 <paper-tab link> |
| 77 <a href="#link2" class="link">TAB TWO</a> |
| 78 </paper-tab> |
| 79 <paper-tab link> |
| 80 <a href="#link3" class="link">TAB THREE</a> |
| 81 </paper-tab> |
| 82 </paper-tabs> |
| 83 </code></pre> |
| 84 |
| 85 ### Styling |
| 86 |
| 87 The following custom properties and mixins are available for styling: |
| 88 |
| 89 | Custom property | Description | Default | |
| 90 | --- | --- | --- | |
| 91 | `--paper-tabs-selection-bar-color` | Color for the selection bar | `--paper-ye
llow-a100` | |
| 92 | `--paper-tabs` | Mixin applied to the tabs | `{}` | |
| 68 | 93 |
| 69 | 94 |
| 70 | 95 |
| 71 ##<paper-tab> | 96 ##<paper-tab> |
| 72 | 97 |
| 73 `paper-tab` is styled to look like a tab. It should be used in conjunction with | 98 `paper-tab` is styled to look like a tab. It should be used in conjunction with |
| 74 `paper-tabs`. | 99 `paper-tabs`. |
| 75 | 100 |
| 76 Example: | 101 Example: |
| 77 | 102 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 91 | --- | --- | --- | | 116 | --- | --- | --- | |
| 92 | `--paper-tab-ink` | Ink color | `--paper-yellow-a100` | | 117 | `--paper-tab-ink` | Ink color | `--paper-yellow-a100` | |
| 93 | `--paper-tab` | Mixin applied to the tab | `{}` | | 118 | `--paper-tab` | Mixin applied to the tab | `{}` | |
| 94 | `--paper-tab-content` | Mixin applied to the tab content | `{}` | | 119 | `--paper-tab-content` | Mixin applied to the tab content | `{}` | |
| 95 | `--paper-tab-content-unselected` | Mixin applied to the tab content when the t
ab is not selected | `{}` | | 120 | `--paper-tab-content-unselected` | Mixin applied to the tab content when the t
ab is not selected | `{}` | |
| 96 | 121 |
| 97 This element applies the mixin `--paper-font-common-base` but does not import `p
aper-styles/typography.html`. | 122 This element applies the mixin `--paper-font-common-base` but does not import `p
aper-styles/typography.html`. |
| 98 In order to apply the `Roboto` font to this element, make sure you've imported `
paper-styles/typography.html`. | 123 In order to apply the `Roboto` font to this element, make sure you've imported `
paper-styles/typography.html`. |
| 99 | 124 |
| 100 | 125 |
| OLD | NEW |