Skip to content

Counter

Counter ​

jsx
import Counter from '@semcore/ui/counter';
<Counter />;

NSCounter.Props ​

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

AnimatedNumber ​

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

jsx
import { AnimatedNumber } from '@semcore/ui/counter';
<AnimatedNumber />;

NSAnimatedNumber.Props ​

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.