Skip to main content

Counter

When you want to display a number with a bit more flair than usual.

£ 120.00 in bank account
<blaze-counter start="120"
               value="0"
               duration="10"
               decimals="2"
               delay="2000">
  <span slot="prefix">&pound;</span>
  <span slot="suffix"> in bank account</span>
</blaze-counter> 

Attributes

Name Description
start: number The initial value of the counter
value: number The value the counter will end on
duration: number (seconds) The time in seconds the counter will take to go from start to value
delay: number (millisecond) How long the counter will wait before starting
decimals: number Number of decimal places to display

Methods

Name Description
reset(): void Resets the display to the initial start value
restart(): void Will reset the display and it will immediately start the counter again
pauseResume(): void Pause or resume the counter
update(value: number): void Changes the value and automatically starts the counter

Events

Name Description
complete: void Trigged when the counter has finished