优雅顺滑的数字流式过渡与翻滚动效组件,支持跨现代前端框架与数字格式化。
Examples7KFollowBasic usagePropsStylingGroupingHooksLimitationsTake the courseLearn to build components like NumberFlowformat: Intl.NumberFormatOptionslocales: Intl.LocalesArgumentprefix: string, suffix: stringTimingsisolate: booleanDefault: falseanimated: booleanDefault: truedigits: Record<number, { max?: number }>respectMotionPreference: booleanDefault: trueplugins: Plugin[]willChange: booleanDefault: falsenonce: stringonAnimationsStart: (e: CustomEvent) => voidonAnimationsFinish: (e: CustomEvent) => voidline-heightDefault: 1font-variant-numeric: tabular-numsContinuous CounterCurrency FormatterPercentage ShiftTrend Indicator AnimationDynamic Number Scroller
NumberFlow 是由 Max Barvian 开发的一款在数字变动时提供丝滑物理位移动画的轻量级前端组件。它巧妙解决了数字宽度跳动、正负号翻转与货币符号排版过渡难题,支持高度自适应且零布局抖动,深度适配 React、Vue、Svelte 及原生 JS 环境。