An open API service indexing awesome lists of open source software.

https://github.com/bestvist/vue-clock2

vue clock component :grinning:
https://github.com/bestvist/vue-clock2

clock component time vue

Last synced: 5 months ago
JSON representation

vue clock component :grinning:

Awesome Lists containing this project

README

          

vue clock2



npm version


downloads


license MIT

> Analogue Clock Component for Vue.js

## Install

```console
npm install vue-clock2
```

or

```console
yarn add vue-clock2
```

## Example for Vue.js 2

[Demo](https://bestvist.github.io/vue-clock2/docs/)

```html

import Clock from 'vue-clock2';
export default {
components: { Clock },
data () {
return {
time: '10:40:00'
}
}
}

```

## Example for Nuxt.js 2.10+

```js
// Add this to ~/plugins/clock.js

import Clock from 'vue-clock2';
import Vue from 'vue';

Vue.component('clock', Clock);
```

```js
// Add clock.js to your nuxt.config.js
plugins: [
{ src: '~plugins/clock', mode: 'client' }
],
```

```html



```

## Default Style

![](./clock.png)

## Some Sample Styles

![](./clock-color.png)

## Props

| Property | Description | Type | Accepted Values | Default |
|-|-|-|-|-|
| time | time to display | String | - | - |
| color | color to display | String | - | - |
| border | clock border style | String | - | '2px solid' |
| bg | clock background style | String | - | - |
| size | size to display | String | - | 150px |

## License

[MIT](https://github.com/bestvist/vue-clock2/blob/master/LICENSE)