Timer
Last updated
Last updated
Displays a countdown or stopwatch.
end
TYPE | DEFAULT VALUE |
---|---|
| None |
The end of the countdown, as a Date
instance.
start
TYPE | DEFAULT VALUE |
---|---|
| None |
The start of a timer, as a Date
instance.
format
TYPE | DEFAULT VALUE |
---|---|
|
|
Options: [ 'yMdhms', 'yMdhm', 'yMdh','yMd', 'yM', 'Mdhms', 'Mdhm', 'Mdh', 'Md', 'dhms', 'dhm', 'hms', 'hm', 'ms', 'm', 's' ]
Format output in years 'y', months 'M', days 'd', hours 'h', minutes 'm', seconds 's'
maxUnits
TYPE | DEFAULT VALUE |
---|---|
|
|
Is the number of units to be displayed regardless of the format
. By default, it’s set to -1 which will display all the available units. If it’s set to a number n
, which can be from 1
to all the units used in the format
prop, it will display only the first n
units, left to right.
showEmpty
TYPE | DEFAULT VALUE |
---|---|
|
|
Display the units on the left side of the timer when they are equal to zero.
showIcon
TYPE | DEFAULT VALUE |
---|---|
|
|
Display the clock icon on the left side of the timer.