1.0.5 • Published 7 months ago

js-promotion-timer v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

js-promotion-timer

Countdown timer until the end of the promotion

Installation

npm i js-promotion-timer

Usage

ES6

import promoTimer from "js-promotion-timer";
promoTimer({
	timePromotionEnd: string,
	timerSelector: selectorTimerContainer,
	clockSelectors: {
		days: selector,
		hours: selector,
		minutes: selector,
		seconds: selector,
	}
})

Example

watch example

import promoTimer from "js-promotion-timer";
promoTimer({
	timePromotionEnd: '2023-12-25',
	timerSelector: '.promotion__timer',
	clockSelectors: {
		days: '#days',
		hours: '#hours',
		minutes: '#minutes',
		seconds: '#seconds',
	}
})

Customazing styles

You can customaze what ever you want. You have you're HTML markup and you're css style's

Params

ParametersNameTypeDetailExampleOptional?
timePromotionEndStringselector of timer container'2023-12-25'
timerSelectorStringselector of timer container'.promotion__timer'
clockSelectorsObject {}object with dd:hh:mm:ss selectors-
daysStringselector where insert remaining days'#days'
hoursStringselector where insert remaining hours'#hours'
minutesStringselector where insert remaining minutes'#minutes'
secondsStringselector where insert remaining seconds'#seconds'

License

Copyright (c) 2023 CrawFish666 Released under the MIT license

1.0.5

7 months ago

1.0.2

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago