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-styles/color.html">
14
<link rel="import" href="paper-spinner-behavior.html">
15
<link rel="import" href="paper-spinner-styles.html">
18
Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
20
Element providing a multiple color material design circular spinner.
22
<paper-spinner active></paper-spinner>
24
The default spinner cycles between four layers of colors; by default they are
25
blue, red, yellow and green. It can be customized to cycle between four different
26
colors. Use <paper-spinner-lite> for single color spinners.
30
Alt attribute should be set to provide adequate context for accessibility. If not provided,
31
it defaults to 'loading'.
32
Empty alt can be provided to mark the element as decorative if alternative content is provided
33
in another form (e.g. a text block following the spinner).
35
<paper-spinner alt="Loading contacts list" active></paper-spinner>
39
The following custom properties and mixins are available for styling:
41
Custom property | Description | Default
42
----------------|-------------|----------
43
`--paper-spinner-layer-1-color` | Color of the first spinner rotation | `--google-blue-500`
44
`--paper-spinner-layer-2-color` | Color of the second spinner rotation | `--google-red-500`
45
`--paper-spinner-layer-3-color` | Color of the third spinner rotation | `--google-yellow-500`
46
`--paper-spinner-layer-4-color` | Color of the fourth spinner rotation | `--google-green-500`
47
`--paper-spinner-stroke-width` | The width of the spinner stroke | 3px
50
@element paper-spinner
55
<dom-module id="paper-spinner">
57
<style include="paper-spinner-styles"></style>
59
<div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]">
60
<div class="spinner-layer layer-1">
61
<div class="circle-clipper left">
62
<div class="circle"></div>
63
</div><div class="gap-patch">
64
<div class="circle"></div>
65
</div><div class="circle-clipper right">
66
<div class="circle"></div>
70
<div class="spinner-layer layer-2">
71
<div class="circle-clipper left">
72
<div class="circle"></div>
73
</div><div class="gap-patch">
74
<div class="circle"></div>
75
</div><div class="circle-clipper right">
76
<div class="circle"></div>
80
<div class="spinner-layer layer-3">
81
<div class="circle-clipper left">
82
<div class="circle"></div>
83
</div><div class="gap-patch">
84
<div class="circle"></div>
85
</div><div class="circle-clipper right">
86
<div class="circle"></div>
90
<div class="spinner-layer layer-4">
91
<div class="circle-clipper left">
92
<div class="circle"></div>
93
</div><div class="gap-patch">
94
<div class="circle"></div>
95
</div><div class="circle-clipper right">
96
<div class="circle"></div>
107
Polymer.PaperSpinnerBehavior