All Projects → vishnuramana → analogclock

vishnuramana / analogclock

Licence: MIT license
🕰 A customizable analog clock built using React

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to analogclock

AnalogClock
Animated analog for iOS clock written in Swift
Stars: ✭ 24 (+50%)
Mutual labels:  clock, analog, analog-clock
Listplaceholder
ListPlaceholder is a swift library allows you to easily add facebook style animated loading placeholder to your tableviews or collection views.
Stars: ✭ 511 (+3093.75%)
Mutual labels:  custom, customizable
Neovim Init.vim
🏮 The perfect Neovim configuration for productive people who wants to level up their Vim experience with a clean, minimal-looking aesthetic, as well as a highly extensible, easily customizable set of popular tools and shortcuts to boost productivity. 🏮
Stars: ✭ 440 (+2650%)
Mutual labels:  custom, customizable
Hhcustomcorner
Awesome library to customize corners of UIView and UIButton. Now you can customize each corner differently
Stars: ✭ 36 (+125%)
Mutual labels:  custom, customizable
Positional
An elegant and colorful location information app for Android with Compass, Clock, Level, Sun, Moon, Trail Marker and many other features.
Stars: ✭ 72 (+350%)
Mutual labels:  clock, customizable
Incrementproductview
Interesting concept of products incrementation
Stars: ✭ 262 (+1537.5%)
Mutual labels:  custom, customizable
Django Admin Interface
django's default admin interface made customizable. popup windows replaced by modals. :mage: ⚡️
Stars: ✭ 717 (+4381.25%)
Mutual labels:  custom, customizable
dev doctor
Free, opensource, serverless learning platform
Stars: ✭ 34 (+112.5%)
Mutual labels:  custom, customizable
Frameless Titlebar
Customizable Electron Titlebar for frameless windows
Stars: ✭ 167 (+943.75%)
Mutual labels:  custom, customizable
Customasm
💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Stars: ✭ 211 (+1218.75%)
Mutual labels:  custom, customizable
Welcome Ui
Customizable design system of @wttj with react • styled-components • styled-system • reakit
Stars: ✭ 256 (+1500%)
Mutual labels:  styled-components, customizable
Timestamp
⏰ A better macOS menu bar clock.
Stars: ✭ 296 (+1750%)
Mutual labels:  clock, customizable
React Scrollbars Custom
The best React custom scrollbars component
Stars: ✭ 576 (+3500%)
Mutual labels:  custom, customizable
Animatedgraph
Animated Graph which you can include in your application to show information in more attractive way
Stars: ✭ 162 (+912.5%)
Mutual labels:  custom, customizable
time
The simplest but configurable online clock
Stars: ✭ 77 (+381.25%)
Mutual labels:  custom, clock
ElevenClock
ElevenClock: Customize Windows 11 taskbar clock
Stars: ✭ 1,494 (+9237.5%)
Mutual labels:  clock, customizable
blue-collar-rocket
I built this as a capstone project of our web development boot camp. Blue Collar Rocket is an app to streamline processes in craftsmanship.
Stars: ✭ 13 (-18.75%)
Mutual labels:  styled-components
babel-plugin-object-styles-to-template
Babel plugin to transpile object styles to template literal
Stars: ✭ 33 (+106.25%)
Mutual labels:  styled-components
manifest
This is where the magic begins
Stars: ✭ 29 (+81.25%)
Mutual labels:  custom
styless
Style your components declaratively with familiar less syntax
Stars: ✭ 64 (+300%)
Mutual labels:  styled-components

Analog Clock using React

CircleCI Coverage Status npm npm NPM

This is a customizable analog clock completely built using React. It is customizable by passing an options JSON Object to the component which allows you to modify the clock colors. It also allows you to use multiple timezones.

Clock Preview

Demo

You can customize/view a live demo of the clock here.

Installation

Install the package using

npm install --save analog-clock-react

Usage

Import the AnalogClock component into your React Component like this

import AnalogClock from 'analog-clock-react';

Then use the AnalogClock Component like this

let options = {
    width: "300px",
    border: true,
    borderColor: "#2e2e2e",
    baseColor: "#17a2b8",
    centerColor: "#459cff",
    centerBorderColor: "#ffffff",
    handColors: {
      second: "#d81c7a",
      minute: "#ffffff",
      hour: "#ffffff"
    }
};
.....
<AnalogClock {...options} />

You can customize the clock using the different properties in the options JSON Object.

Please visit the demo page to get a live preview of the clock.

Features

  • Custom Time / Timezone Support

    AnalogClock now supports using your own custom time/timezone. To enable custom time usage, set useCustomTime to true and set your own hours, minutes and seconds in the options JSON Object like below:

      let options = {
          useCustomTime: true,    // set this to true
          width: "300px",
          border: true,
          borderColor: "#2e2e2e",
          baseColor: "#17a2b8",
          centerColor: "#459cff",
          centerBorderColor: "#ffffff",
          handColors: {
            second: "#d81c7a",
            minute: "#ffffff",
            hour: "#ffffff"
          },
          "seconds": 1,   // set your
          "minutes": 10,  // own
          "hours": 22     // time here.
      };
    

    Once you do that, AnalogClock will expect you to give it the hours, minutes and seconds value.

    Note: You will have to use a setInterval in the component where you use <AnalogClock> to update the options object with the time that you pass. An example is given below:

    updateClock = () => {
      let ausTime = new Date().toLocaleString("en-US", { timeZone: "Australia/Brisbane" });
      let date = new Date(ausTime);
    
      this.setState({
        'options': {
          ...this.state.options,
          seconds: date.getSeconds(),
          minutes: date.getMinutes(),
          hours: date.getHours()
        }
      })
    }
    ....
    this.interval = setInterval(this.updateClock, 1000);
    

Change Log

  • v1.3.0

    • Added finer movement of hour hand
  • v1.2.2

    • Fixed clock hand centering issues
    • Removed unwanted code

Contribution

If you wish to contribute to this project, please use the dev branch to add your changes and test. Make sure all the tests are passed and optimal code coverage is present. Once you are done with your changes, please raise a PR.

Issues/Feature Requests

For any issues/feature-requests, you can create an issue in Github or email me at [email protected]

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].