Counter
When you want to display a number with a bit more flair than usual.
Transfer complete!
£ in bank account
<blaze-counter
class="u-super u-text--mono"
auto-start
start-value="120"
end-value="0"
duration="5"
decimals="2"
delay="2000">
<span slot="prefix">£</span>
<span slot="suffix" class="u-text--quiet u-xsmall"> in bank account</span>
</blaze-counter>
Attributes
Name | Description |
---|---|
auto-start: boolean | Automatically start the counter |
start-value: number | The initial value of the counter |
end-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 |
---|---|
start(): void | Starts the counter taking the delay into account |
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 |
---|---|
finish: void | Trigged when the counter has finished |