4
This README is automatically generated from the comments in these files:
5
paper-header-panel.html
7
Edit those files, and our readme bot will duplicate them over here!
8
Edit this file, and the bot will squash your changes :)
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
15
[![Build status](https://travis-ci.org/PolymerElements/paper-header-panel.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-header-panel)
17
_[Demo and API docs](https://elements.polymer-project.org/elements/paper-header-panel)_
20
##<paper-header-panel>
22
`paper-header-panel` contains a header section and a content panel section.
24
__Important:__ The `paper-header-panel` will not display if its parent does not have a height.
26
Using layout classes, you can make the `paper-header-panel` fill the screen
29
<body class="fullbleed layout vertical">
30
<paper-header-panel class="flex">
32
<div>Hello World!</div>
38
Special support is provided for scrolling modes when one uses a paper-toolbar or equivalent for the
45
<paper-toolbar>Header</paper-toolbar>
46
<div>Content goes here...</div>
50
If you want to use other than `paper-toolbar` for the header, add `paper-header` class to that
57
<div class="paper-header">Header</div>
58
<div>Content goes here...</div>
62
To have the content fit to the main area, use the `fit` class.
66
<div class="paper-header">standard</div>
67
<div class="fit">content fits 100% below the header</div>
73
Controls header and scrolling behavior. Options are `standard`, `seamed`, `waterfall`, `waterfall-tall`, `scroll` and
74
`cover`. Default is `standard`.
76
| Mode | Description |
78
| `standard` | The header is a step above the panel. The header will consume the panel at the point of entry, preventing it from passing through to the opposite side. |
79
| `seamed` | The header is presented as seamed with the panel. |
80
| `waterfall` | Similar to standard mode, but header is initially presented as seamed with panel, but then separates to form the step. |
81
| `waterfall-tall` | The header is initially taller (`tall` class is added to the header). As the user scrolls, the header separates (forming an edge) while condensing (`tall` class is removed from the header). |
82
| `scroll` | The header keeps its seam with the panel, and is pushed off screen. |
83
| `cover` | The panel covers the whole `paper-header-panel` including the header. This allows user to style the panel in such a way that the panel is partially covering the header. |
88
<paper-header-panel mode="waterfall">
89
<div class="paper-header">standard</div>
90
<div class="content fit">content fits 100% below the header</div>
96
To change the shadow that shows up underneath the header:
100
--paper-header-panel-shadow: {
103
box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
108
To change the panel container in different modes:
112
--paper-header-panel-standard-container: {
113
border: 1px solid gray;
116
--paper-header-panel-seamed-container: {
117
border: 1px solid gray;
120
--paper-header-panel-waterfall-container: {
121
border: 1px solid gray;
124
--paper-header-panel-waterfall-tall-container: {
125
border: 1px solid gray;
128
--paper-header-panel-scroll-container: {
129
border: 1px solid gray;
132
--paper-header-panel-cover-container: {
133
border: 1px solid gray;
138
The following custom properties and mixins are available for styling:
140
| Custom property | Description | Default |
142
| `--paper-header-panel` | Mixin applied to the element | `{}` |
143
| `--paper-header-panel-body` | Mixin applied to the element's body (i.e. everything below the toolbar) | `{}` |
144
| `--paper-header-panel-scroll-container` | Mixin applied to the container when in scroll mode | `{}` |
145
| `--paper-header-panel-cover-container` | Mixin applied to the container when in cover mode | `{}` |
146
| `--paper-header-panel-standard-container` | Mixin applied to the container when in standard mode | `{}` |
147
| `--paper-header-panel-seamed-container` | Mixin applied to the container when in seamed mode | `{}` |
148
| `--paper-header-panel-waterfall-container` | Mixin applied to the container when in waterfall mode | `{}` |
149
| `--paper-header-panel-waterfall-tall-container` | Mixin applied to the container when in tall waterfall mode | `{}` |