@madhusha_99/vue3-analog-clock
Version:
A simple analog clock component for Vue 3
103 lines (69 loc) โข 2.74 kB
Markdown
# Vue 3 Analog Clock Component
A simple **analog clock component** for **Vue 3**.
## ๐ฆ Installation
**Install the package via npm:**
```bash
npm install @madhusha_99/vue3-analog-clock
```
or visit the [npm package page](https://www.npmjs.com/package/@madhusha_99/vue3-analog-clock)
## ๐ Usage
### Import the component in your `main.js` or `main.ts`
```javascript
import { createApp } from "vue";
import App from "./App.vue";
import AnalogClock from "@madhusha_99/vue3-analog-clock";
import "@madhusha_99/vue3-analog-clock/dist/style.css";
const app = createApp(App);
app.use(AnalogClock);
app.mount("#app");
```
### Use the component in your template
```html
<template>
<div>
<AnalogClock />
</div>
</template>
```
## ๐จ Customization Options
You can customize the appearance of the analog clock component using the following props:
| Prop | Description | Default |
| ----------------------------- | ---------------------------------- | --------- |
| `watchFaceBackground` | Background color of the clock face | `#f9f9f9` |
| `watchDigitsColor` | Color of the clock digits | `#000000` |
| `watchDigitsMinuteMarksColor` | Color of minute marks | `#929394` |
| `watchHoursHand` | Hour hand color | `#232425` |
| `watchMinutesHand` | Minute hand color | `#343536` |
| `watchSecondsHand` | Seconds hand color | `#c00` |
### Example
```html
<template>
<div>
<AnalogClock
watchFaceBackground="#673F69"
watchDigitsColor="#FFFFFF"
watchDigitsMinuteMarksColor="#FFFFFF"
watchHoursHand="#FFAF45"
watchMinutesHand="#FB6D48"
watchSecondsHand="#E72929"
/>
</div>
</template>
```
## ๐งช Demo
### Default Analog Clock

### Customized Analog Clock

## ๐ฑ Contributors
[](https://github.com/MadhushaPrasad/vue-analog-clock/graphs/contributors)
## ๐ License
This package is licensed under the [MIT License](https://github.com/MadhushaPrasad/vue-analog-clock/blob/main/LICENSE)
## ๐ Keywords
**Vue, Vue 3, Analog Clock, Clock Component, Vue Component**