![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@choudharymahipal/countdown-timer
Advanced tools
You can install it from here [NPM Package](https://www.npmjs.com/package/@choudharymahipal/countdown-timer)
You can install it from here NPM Package
CountdownTimer is a lightweight, customizable JavaScript library that enables you to create countdown timers effortlessly. Ideal for web applications, events, or any time-based functionality.
Install the library via npm:
npm i @choudharymahipal/countdown-timer
if any dependancy error then try this
npm i @choudharymahipal/countdown-timer --legacy-peer-deps
In your app.module.ts:
import { CountdownTimerModule } from '@choudharymahipal/countdown-timer';
@NgModule({
imports: [
CountdownTimerModule
],
})
export class AppModule { }
Use the countdown timer in your component's template:
For v0.0.2 : Just pass your
targetDate
and it will generate countdown timer based ontargetDate
. HeretargetDate
is required and It will acceptDate
format only, not a string.
<mahi-countdown-timer [targetDate]="targetDate"></mahi-countdown-timer>
For v1.0.0 : We have added 4 new properties to show and hide any card based on your requirements.
display_days
,display_hours
,display_minutes
anddisplay_seconds
areboolean
type variables. Just passtrue
andfalse
, it will show/hide cards automatically. All these 4 properties are optional.
<mahi-countdown-timer
[targetDate]="targetDate"
[display_days]="display_days"
[display_hours]="display_hours"
[display_minutes]="display_minutes"
[display_seconds]="display_seconds"
>
</mahi-countdown-timer>
For v2.0.0 : Now, New customizable Labels and callback events are introduced. You can add your own labels for each cards in your language. And from
isTimerRunning
andtimeRemainingCount
, will give you, latest updated status about current countdown timer. For more details you can check its demo on stackblitz.
<mahi-countdown-timer
[targetDate]="targetDate"
[display_days]="display_days"
[display_hours]="display_hours"
[display_minutes]="display_minutes"
[display_seconds]="display_seconds"
[label_days]="label_days"
[label_hours]="label_hours"
[label_minutes]="label_minutes"
[label_seconds]="label_seconds"
(isTimerRunning)="getIsTimerRunning($event)"
(timeRemainingCount)="getTimeRemainingCount($event)">
>
</mahi-countdown-timer>
In your component TypeScript file:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class YourComponent {
targetTime: Date = new Date('2025-12-31T23:59:59'); //Required
//show and hide cards
display_days: boolean = false; //Optional
display_hours: boolean = true; //Optional
display_minutes: boolean = true; //Optional
display_seconds: boolean = true; //Optional
//labels
label_days: string = "Day"; //Optional
label_hours: string = "Hour"; //Optional
label_minutes: string = "Minute"; //Optional
label_seconds: string = "Second"; //Optional
//Callback events
isTimerRunning: boolean = false;
timeRemaining = {
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
};
constructor() {}
getIsTimerRunning(event:any){
this.isTimerRunning = event;
}
getTimeRemainingCount(event:any){
this.timeRemaining = event;
}
}
[!NOTE] We welcome contributions to the Countdown Timer Library! If you'd like to help out, please visit our GitHub repository: countdown-timer-library.
FAQs
You can install it from here [NPM Package](https://www.npmjs.com/package/@choudharymahipal/countdown-timer)
We found that @choudharymahipal/countdown-timer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.