Directory

← Back

analog-clock

A clock, analog style

Author

Rating

Popularity

<100

<analog-clock>

An analog clock component written in plain JavaScript:

screen shot 2018-12-12 at 6 00 19 pm

Usage

Basic usage with local time:

<analog-clock></analog-clock>

Providing a time attribute will set the exact time and not update the clock.

<analog-clock time="1301757851000"></analog-clock>

Providing an offset sets the time zone offset. The following sets the time in New York:

<analog-clock offset="-5"></analog-clock>

JavaScript

Anything you can do in HTML with attributes can also be done using the JavaScript API with properties:

import { AnalogClock } from './path/to/clock.js';

let clock = new AnalogClock();
clock.offset = -6;

document.body.appendChild(clock);

License

BSD-2-Clause

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

Released
2019-01-10
Maturity
IMPORTED
License
ISC License

Compatibility

Framework
Browser
Browser Independent

analog-clock - Vaadin Add-on Directory

A clock, analog style analog-clock - Vaadin Add-on Directory
# <analog-clock> An analog clock component written in plain JavaScript: ![screen shot 2018-12-12 at 6 00 19 pm](https://user-images.githubusercontent.com/361671/49904346-d8472e00-fe37-11e8-9884-3db66b9f3985.png) ## Usage Basic usage with local time: ```html ``` Providing a __time__ attribute will set the exact time and not update the clock. ```html ``` Providing an __offset__ sets the time zone offset. The following sets the time in New York: ```html ``` ### JavaScript Anything you can do in HTML with attributes can also be done using the JavaScript API with properties: ```js import { AnalogClock } from './path/to/clock.js'; let clock = new AnalogClock(); clock.offset = -6; document.body.appendChild(clock); ``` ## License BSD-2-Clause
View on GitHub
View on NPM

analog-clock version 1.0.0
### Dependencies

Online