YuhuanStudioYunUIDocs
Data Display

Animated Number

A number that springs from 0 to value on mount; SSR-hydration safe.

A number that springs from 0 up to value on mount (and whenever value changes). It starts at 0 on both server and client, so it is safe to render during SSR and hydration. Use suffix for units and decimals for fractional precision.

Import

import { AnimatedNumber } from "@yuhuanowo/yunui";

Basic

Count up

0

With a suffix

Append a unit such as % or K with the suffix prop.

Suffix

0%

Decimals

Set decimals for fractional values; trailing zeros are stripped.

Decimal places

0

Props

PropTypeDefaultDescription
decimalsnumber0Decimal places; trailing zeros are stripped (100.00 → 100).
suffixstring
value*number

On this page