If the clock is running, this function will be called with the current time value each time it changes.
function
('T10:37:46') => {}
precision
How precise a time to represent.
string
"hours"
"minutes"
seconds
run
Whether the clock should actively adjust time or be fixed to the time specified. 'backward' could be used as a countdown timer.
boolean
true
false
string
"backward"
"forward"
size
Size for both Analog and Digital Clocks. For Analog, there's also 'huge', that's equal to 'xxlarge' and exists for backwards compatibility
string
T-shirt sizing based off the theme or a specific size in px, em, etc.
"xsmall"
"small"
medium
"large"
"xlarge"
"xxlarge"
"string"
time
ISO8601 time or duration. For example: 'PT8H12M23S', 'T08:12:23', or '2015-02-22T08:12:23'. Any included date portion will be ignored. If not provided, the current browser time will be used.
string
"2018-10-23T10:37:45"
"T10:37:45"
"PT10H37M45S"
type
What type of visualization to show.
string
"analog"
"digital"
React/DOM Properties
At its core, the Clock component is a regular <div> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for div elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.
At its core, the Clock component is a regular <svg> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for svg elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.