4 |
5 |
6 |
7 |
8 | vue-spinners-css
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/components/index.js:
--------------------------------------------------------------------------------
1 | import CircleLoader from './CircleLoader.vue'
2 | import DefaultLoader from './DefaultLoader.vue'
3 | import DualRingLoader from './DualRingLoader.vue'
4 | import EllipsisLoader from './EllipsisLoader.vue'
5 | import FacebookLoader from './FacebookLoader.vue'
6 | import GridLoader from './GridLoader.vue'
7 | import HeartLoader from './HeartLoader.vue'
8 | import HourglassLoader from './HourglassLoader.vue'
9 | import LineLoader from './LineLoader.vue'
10 | import RingLoader from './RingLoader.vue'
11 | import RippleLoader from './RippleLoader.vue'
12 | import RollerLoader from './RollerLoader.vue'
13 | import SpinnerLoader from './SpinnerLoader.vue'
14 | import OrbitalsLoader from './OrbitalsLoader.vue'
15 |
16 | export {
17 | CircleLoader,
18 | DefaultLoader,
19 | DualRingLoader,
20 | EllipsisLoader,
21 | FacebookLoader,
22 | GridLoader,
23 | HeartLoader,
24 | HourglassLoader,
25 | LineLoader,
26 | RingLoader,
27 | RippleLoader,
28 | RollerLoader,
29 | SpinnerLoader,
30 | OrbitalsLoader,
31 | }
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Josh Kuttler
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/src/components/CircleLoader.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
41 |
42 |
68 |
--------------------------------------------------------------------------------
/src/components/DualRingLoader.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 | Amazing collection of Vue spinners components with pure css.
15 | The Vue spinners are based on loading.io and from all over the web.
16 |
17 | - 💅No extra CSS imports
18 | - ✂️Zero dependencies
19 | - 📦Spinners can be installing separately
20 |
21 | ## [Live Demo](https://bit.dev/joshk/vue-spinners-css)
22 |
23 | Browse components and explore their props with [Bit](https://bit.dev/joshk/vue-spinners-css).
24 | Install specific vue spinner component with npm, yarn, unpkg or bit without having to install the whole project.
25 | [Install components and live demo](https://bit.dev/joshk/vue-spinners-css)
26 |
27 | ## 🚀 List of Spinners - PropTypes and Default Props
28 |
29 | Each component accepts a `color` prop, and `loading` prop.
30 | The default `color` prop is `#7f58af`.
31 | The default `loading` prop is `true`.
32 | Component that accepts size prop have a default size in pixel.
33 | Component that accepts duration prop have a default duration in seconds.
34 |
35 | | Spinner | color: string | loading: boolean | size: number | duration: string |
36 | | ---------------- | ------------ | ----------------- | ------------ | ---------------- |
37 | | Circle Spinner | `#7f58af` | `true` | `64` | `2.4s` |
38 | | Default Spinner | `#7f58af` | `true` | `80` | `1.2s` |
39 | | DualRing Spinner | `#7f58af` | `true` | `80` | `1.2s` |
40 | | Ellipsis Spinner | `#7f58af` | `true` | | |
41 | | Facebook Spinner | `#7f58af` | `true` | `80` | `1.2s` |
42 | | Grid Spinner | `#7f58af` | `true` | `80` | `1.2s` |
43 | | Heart Spinner | `#7f58af` | `true` | `80` | `1.2s` |
44 | | Hourglass Spinner| `#7f58af` | `true` | `80` | `1.2s` |
45 | | Ring Spinner | `#7f58af` | `true` | `80` | `1.2s` |
46 | | Ripple Spinner | `#7f58af` | `true` | `80` | `1s` |
47 | | Roller Spinner | `#7f58af` | `true` | `80` | `1.2s` |
48 | | Spinner Spinner | `#7f58af` | `true` | `80` | `1.2s` |
49 | | Orbitals Spinner | `#7f58af` | `true` | `80` | `4s` |
50 | | Line Spinner | `#7f58af` | `true` | `80` | `1.2s` |
51 |
52 | ## 📦 Installation
53 | ### Using [npm](https://www.npmjs.com/package/vue-spinners-css) to install vue-spinners-css:
54 |
55 | ```bash
56 | $ npm i --save vue-spinners-css
57 | ```
58 |
59 | ### Play and install vue spinners with Bit
60 |
61 | Install specific vue spinner component with bit, npm or yarn without having to install the whole project.
62 | Using [bit](https://bit.dev/joshk/vue-spinners-css) to play with live demo, and try the spinners before install.
63 |
64 | set npm regisetry config(one time action):
65 | ```bash
66 | npm config set '@bit:registry' https://node.bit.dev
67 | ```
68 | and use your favorite package manager:
69 | ```bash
70 | npm i @bit/joshk.vue-spinners-css.facebook-loader
71 | yarn add @bit/joshk.vue-spinners-css.facebook-loader
72 | bit import joshk.vue-spinners-css/facebook-loader
73 | ```
74 |
75 | ## 💻 Usage Examples
76 |
77 | you can use a random color from [jotils](https://bit.dev/joshk/jotils/get-random-color)
78 |
79 | ### Vue Global Registration
80 | ```javascript
81 | import Vue from 'vue'
82 | import * as VueSpinnersCss from "vue-spinners-css";
83 |
84 | Vue.use(VueSpinnersCss)
85 |
86 | // Each spinner can now be used in your templates anywhere in the app!
87 | ```
88 |
89 | ### Vue Local Registration
90 | ```html
91 |
92 |
93 |
94 |
95 |
96 |
112 | ```
113 |
114 | ### Unpkg Import
115 | ```html
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
128 | ```
129 |
130 |
131 | ## 👾 Development
132 | You can see the components locally by cloning this repo and doing the following steps:
133 | - Install dependencies from `package.json`, run: `npm install`.
134 | - Run the app in the development mode, run: `npm run serve`.
135 |
136 | ## ⌨️ Contributing
137 | - Pull requests and ⭐ stars are always welcome.
138 | - For bugs and feature requests, please create an issue.
139 |
140 | ## 👏🏻 Support my open-source
141 | If you like to support my open-source contributions please star and share this project. 💫
142 |
143 | ## 📄 License
144 | [MIT](https://github.com/JoshK2/vue-spinners-css/blob/master/LICENSE)
145 |
146 |
--------------------------------------------------------------------------------
/src/components/OrbitalsLoader.vue:
--------------------------------------------------------------------------------
1 |
2 |