Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clock-web-widget

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clock-web-widget

Simple clock widget with zero dependency

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Simple Clock Widget

This lib allows you to add simple clock widget to your app.

ZERO dependency.

Example

https://vladagurets.github.io/clock-widget-example/

Features

  • Simple clock
  • Draggable clock
  • Countdown mode
  • Speed configuration

Configs

To add clock to yor app run ClockWidget with prefered options:

  • countdown: false, // countdown mode - {boolean}
  • draggable: false, // make clock draggable - {boolean}
  • hMirrored: false, // horizontal mirrored clock - {boolean}
  • vMirrored: false, // vertical mirorred clock - {boolean}
  • date: new Date("December 17, 1995 03:24:00"), // start from Date - {DATE}, by default new Date()
  • lowBattery: false, // just for fun - {boolean}
  • size: 277, // size of clock, one of ['small', 'medium', large'] or custom number
  • speed: 1 // speed of each tick {Number}

Manual

Initialization
Example
import ClockWidget = 'clock-web-widget';
import 'clock-web-widget/index.css';

const clock = ClockWidget({
  countdown: false,
  draggable: false,
  hMirrored: false,
  vMirrored: false,
  date: new Date("December 17, 1995 03:24:00"),
  lowBattery: false,
  size: 277,
  speed: 1
});
Pause/Resume
Example
clock.pause();
closk.resume();
Overriding configs
Example
clock.update({
  speed: 300,
  draggable: true,
  size: 'large'
});

Keywords

FAQs

Package last updated on 09 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc