A Custom Element for an analog clock.

Overview

<analog-clock>

A Custom Element for an analog clock.

Attributes

  • mode (string): stopwatch or clock.
  • size (number): Width and height in pixel.
  • marks (number): Number of markings on the edge of the clock for telling the time.
  • ticks (boolean): Whether to display the hour numbers on the dial.

Shadow Parts

  • ::part(tick): The numbers on the dial.
  • ::part(tick): The numbers on the dial.
  • ::part(tick1)...::part(tick12): Each of the nubmers on the dial.
  • ::part(clock): The clock face.
  • ::part(marks): The markings on the edge of the clock.
  • ::part(hand-hour): The hour hand.
  • ::part(hand-minute): The minute hand.
  • ::part(hand-second): The second hand.

Methods

  • analogClock.mode = 'clock'/'stopwatch' switches mode between clock and stopwatch.
  • analogClock.toggleStopwatch() starts and stops the stop watch.
  • analogClock.resetStopwatch() resets stopwatch to 0.
  • analogClock.getTimeElapsed() get time elapsed in ms.

Known issues

In Safari, quickly switching between mode might result in janky animation. Related bug reports:

You might also like...

Toaster is a Pure Javascript plugin for displaying toast notifications. It comes with different options e.g custom text or HTML message, duration, custom class, toggle close button, position, custom close icon and backgorund color.

Pure Javascript Toaster Requires Nothing Demo Toaster is a Pure Javascript plugin for displaying toast notifications. It comes with different options

Jun 21, 2022

Clock and task scheduler for node.js applications, providing extensive control of time and callback scheduling in prod and test code

#zeit A node.js clock and scheduler, intended to take place of the global V8 object for manipulation of time and task scheduling which would be handle

Dec 21, 2021

Clock and task scheduler for node.js applications, providing extensive control of time and callback scheduling in prod and test code

#zeit A node.js clock and scheduler, intended to take place of the global V8 object for manipulation of time and task scheduling which would be handle

Dec 21, 2021

Countdown - jQuery CountDown Clock - Simple countdown plugin for product special offers

TronLink Wallet Address TRX - BTC - BTT - USDT: TH9RyofE7WiDDVVFLMJgFns2ByBRmgQzNB jQuery Countdown Clock jQuery countdown plugin that accounts for ti

Aug 30, 2022

Clocklet - An opinionated clock-style vanilla-js timepicker.

Clocklet - An opinionated clock-style vanilla-js timepicker.

An opinionated clock-style vanilla-js timepicker. Demo Features Keyboard and numpad friendly Autocomplete - e.g. "1"-"01:00", "12"-"12:00", "1234"-

Jun 7, 2022

A rainy clock in your terminal.

A rainy clock in your terminal.

era v0.1.0 A rainy clock in your terminal, written with Deno. Installation git clone this repo and compile it. git clone https://github.com/kyoheiu/er

Dec 29, 2022

A tiny clock and date, period, or duration math library 2k (minified/gzipped)

timewave v0.1.4 A tiny time simulation and date/time math library 3k (minified/gzipped) const clock = Clock(new Date(2022,1,1),{tz:'America/New_York

Dec 18, 2022

A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

Clock Timepicker Plugin for jQuery See a demo here A free jQuery Plug-in to select the time with a clock inspired by the Android time picker. This plu

Dec 22, 2022

JQuery Speaking Clock Plugin

jsRapClock JQuery Speaking Clock Plugin More information about this can be found in this article. Demo https://thibor.github.io/jsRapClock/ Properties

Feb 27, 2022

🎉 基于 vite 2.0 + vue 3.0 + vue-router 4.0 + vuex 4.0 + element-plus 的后台管理系统vue3-element-admin

vue3-element-admin 🎉 基于 Vite 2.0 + Vue3.0 + Vue-Router 4.0 + Vuex 4.0 + element-plus 的后台管理系统 简介 vue3-element-admin 是一个后台前端解决方案,它基于 vue3 和 element-plu

Nov 28, 2022

JavaScript micro-library: pass in an element and a callback and this will trigger when you click anywhere other than the element

Add a click listener to fire a callback for everywhere on the window except your chosen element. Installation run npm install @lukeboyle/when-clicked-

May 13, 2021

A custom element for rendering stylable (light DOM) Markdown

Motivation There are many web components these days to render Markdown to HTML. Here are a few: zero-md marked-element …and I’m sure many others H

Dec 20, 2022

lightweight (~5kb) code editor custom element with syntax highlighting

code-edit lightweight (~5kb) code editor custom element with syntax highlighting 🔧 Install · 🧩 Example · 📜 API docs · 🔥 Releases · 💪🏼 Contribute

Apr 14, 2022

📜 A tiny custom element for all your scrollytelling needs!

scroll-scene element A tiny custom element for all your scrollytelling needs! The successor to @newswire/scroller. Key features 🐜 Less than 700 byt

Dec 6, 2022

A custom element that helps save alienated player API's to bring back their true inner HTMLMediaElement API

A custom element that helps save alienated player API's to bring back their true inner HTMLMediaElement API

Oct 14, 2022

Custom element (web component) for Video.js.

videojs-video A custom element (web component) for Video.js. The element API matches the HTML5 video tag, so it can be easily swapped with other m

Jul 11, 2022

little-planet Custom Element: interactive panorama viewer

little-planet This project is a Custom HTML Element (AKA Web Component) that renders an interactive view of a panoramic photo. Can be used with no J

Nov 25, 2022

A custom element that aims to make it easier to embed Spring '83 boards

spring-board element A custom element that makes it simple to embed Spring '83 boards! Usage If you are using spring-board in a client-side framew

Jan 1, 2023

A custom element (web component) for the Vimeo player.

vimeo-video A custom element (web component) for Vimeo. The element API matches the HTML5 video tag, so it can be easily swapped with other media,

Dec 28, 2022
use element-ui with some config

confism-element write HTML with javascript in vue install npm install confism-element -S U can register confism-element component in main.js // main.j

null 16 Jan 14, 2022
An alarm clock is a clock that is designed to alert an individual or group of individuals at a specified time.

An alarm clock (or sometimes just an alarm) is a clock that is designed to alert an individual or group of individuals at a specified time. The primary function of these clocks is to awaken people from their night's sleep or short naps; they are sometimes used for other reminders as well.

Anupam Moharana 1 Dec 25, 2021
null 3.9k Dec 30, 2022
基于vue3.0-ts-Element集成的简洁/实用后台模板!《带预览地址》vue-admin;vue+admin;vue-element;vue+element;vue后台管理;vue3.0-admin;vue3.0-element。

一、基于vue3.0+ts+Element通用后台admin模板 二、在线预览地址:http://admin.yknba.cn/ 三、下载使用: 1、克隆代码 通过git将代码克隆到本地;或者使用下载安装包模式进行下载。 2、进入目录 进入项目的根目录:vue3.0-ts-admin 3、安装依

null 64 Dec 16, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
An example application that uses file-based routing with Angular, Analog, Vite with the Angular Router

Angular, Vite, and File-based routes This is an example application that uses Angular, Analog, and Vite for file-based routing. Routes are places in t

Brandon 9 Sep 25, 2022
This experimental library patches the global custom elements registry to allow re-defining or reload a custom element.

Redefine Custom Elements This experimental library patches the global custom elements registry to allow re-defining a custom element. Based on the spe

Caridy Patiño 21 Dec 11, 2022