npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ngx-analog-clock

v0.0.2

Published

Customizable analog clock for your Angular app

Readme

ngx-analog-clock

npm version npm downloads GitHub license

Angular library for easier use of the View Transitions API

Demo

https://derstimmler.github.io/ngx-analog-clock/

Installation

Available on npm.

npm install ngx-analog-clock

Required Angular version: >=19.0.0

Usage

Import the component:

import { NgxAnalogClock } from 'ngx-analog-clock';

date = new Date();

Provide at least a Date object to the component:

<ngx-analog-clock [date]="date"></ngx-analog-clock>

[!TIP] To get a Date signal of the current local time that updates every second you can use this snippet:

import { toSignal } from '@angular/core/rxjs-interop';
import { map, interval } from 'rxjs';

date = toSignal(interval(1000).pipe(map(() => new Date())), { initialValue: new Date() });

Configuration

| Input | Description | Default Value | |----------------------------|--------------------------------------------------|----------------------------------| | date | Current date/time driving the clock | Required | | showHourHand | Toggle visibility of the hour hand | true | | showMinuteHand | Toggle visibility of the minute hand | true | | showSecondHand | Toggle visibility of the second hand | true | | showHourMarkers | Show hour tick markers | true | | showMinuteMarkers | Show minute tick markers | true | | showClockNumbers | Display clock face numbers | true | | showBezel | Show outer bezel (rim) | true | | transitionDuration | Duration of hand movement transitions | '0.5s' | | transitionFunction | CSS transition timing function for hand movement | 'cubic-bezier(0.4, 2, 0.3, 1)' | | bezelThickness | Thickness of the bezel | '3px' | | pivotThickness | Size of the pivot (center cap) | '12px' | | hourHandThickness | Thickness of the hour hand | '9px' | | hourHandLength | Length of the hour hand relative to radius | '60%' | | minuteHandThickness | Thickness of the minute hand | '6px' | | minuteHandLength | Length of the minute hand relative to radius | '90%' | | secondHandThickness | Thickness of the second hand | '3px' | | secondHandLength | Length of the second hand relative to radius | '97%' | | pivotColor | Color of the pivot | '#ff0000' | | hourHandColor | Color of the hour hand | '#222222' | | minuteHandColor | Color of the minute hand | '#222222' | | secondHandColor | Color of the second hand | '#222222' | | hourMarkerColor | Color of the hour markers | '#222222' | | minuteMarkerColor | Color of the minute markers | '#222222' | | clockNumberColor | Color of the numbers | '#222222' | | dialColor | Background color of the clock face | 'transparent' | | bezelColor | Color of the bezel | '#222222' | | markerOffsetPercent | Radial offset for markers (relative to radius) | 96 | | numbersOffsetPercent | Radial offset for numbers (relative to radius) | 70 | | hourMarkerThickness | Thickness of hour markers | '2%' | | hourMarkerLength | Length of hour markers | '7%' | | minuteMarkerThickness | Thickness of minute markers | '1%' | | minuteMarkerLength | Length of minute markers | '3%' | | hourHandBorderRadius | Border radius of the hour hand | '2px' | | minuteHandBorderRadius | Border radius of the minute hand | '2px' | | secondHandBorderRadius | Border radius of the second hand | '2px' | | minuteMarkerBorderRadius | Border radius of minute markers | '2px' | | hourMarkerBorderRadius | Border radius of hour markers | '2px' |

Most color inputs like dialColor, minuteHandColor or hourMarkerColor are implemented as CSS background property. So it's also possible to use gradient or even images.

Responsiveness

The component behaves like a normal block element and scales dynamically. So just set the width and height as you like.