• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2@license
3Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7Code distributed by Google as part of the polymer project is also
8subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9-->
10
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">
16
17<!--
18Material design: [Progress & activity](https://www.google.com/design/spec/components/progress-activity.html)
19
20Element providing a single color material design circular spinner.
21
22    <paper-spinner-lite active></paper-spinner-lite>
23
24The default spinner is blue. It can be customized to be a different color.
25
26### Accessibility
27
28Alt attribute should be set to provide adequate context for accessibility. If not provided,
29it defaults to 'loading'.
30Empty alt can be provided to mark the element as decorative if alternative content is provided
31in another form (e.g. a text block following the spinner).
32
33    <paper-spinner-lite alt="Loading contacts list" active></paper-spinner-lite>
34
35### Styling
36
37The following custom properties and mixins are available for styling:
38
39Custom property | Description | Default
40----------------|-------------|----------
41`--paper-spinner-color` | Color of the spinner | `--google-blue-500`
42`--paper-spinner-stroke-width` | The width of the spinner stroke | 3px
43
44@group Paper Elements
45@element paper-spinner-lite
46@hero hero.svg
47@demo demo/index.html
48-->
49
50<dom-module id="paper-spinner-lite">
51  <template strip-whitespace>
52    <style include="paper-spinner-styles"></style>
53
54    <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]">
55      <div class="spinner-layer">
56        <div class="circle-clipper left"></div>
57        <div class="circle-clipper right"></div>
58      </div>
59    </div>
60  </template>
61
62  <script>
63    Polymer({
64      is: 'paper-spinner-lite',
65
66      behaviors: [
67        Polymer.PaperSpinnerBehavior
68      ]
69    });
70  </script>
71</dom-module>
72