Skip to content

Counter

Counter

jsx
import Counter from 'intergalactic/counter';
<Counter />;

CounterProps

& {...}
NameTypeDescription
theme"warning" | "danger" | "info" | string Counter theme or custom color
size"m" | "l" | "xl" Counter size

AnimatedNumber

The component which will render some value with animation from initValue (0 by default).

jsx
import { AnimatedNumber } from 'intergalactic/counter';
<AnimatedNumber />;

AnimatedNumberBaseProps

NameTypeDescription
easing(t: number) => number Animates number change, receives value between 0 and 1 and returns value in range from 0 to 1, e.g. for linear easing pass (t) => t
formatValue(value: number) => string Stringify number, receives a fraction value
durationnumber Duration time in ms
delaynumber Delay before animation in ms
initValuenumber The value from which to start the animation
valuenumber The value by which to end the animation

Released under the MIT License.

Released under the MIT License.