Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Number Animation

Digit Swap

DigitSwap.vue
Card number•••• •••• •••• 0806

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/digit-swap

Import the shared styles once in your application.

TSUsage
import DigitSwap from '@/components/beui/numeric/DigitSwap.vue'
import '@/components/beui/styles.css'

API Reference

value
string | number

Numeric or masked value rendered in fixed character slots.

Default—
animationKey?
string | number

Replays every glyph when the value itself contains unchanged characters.

Default—
direction?
DigitSwapDirection

Direction the next glyph enters from.

Default—
duration?
number

Per-glyph transition duration in seconds.

Default—
stagger?
number

Delay in seconds between neighbouring glyphs.

Default—
suffixLength?
number

Number of final characters that receive `suffixClassName`.

Default—
className?
string
Default—
glyphClassName?
string
Default—
suffixClassName?
string
Default—

Number Ticker

NumberTicker.vue

Active users

48,273

live · updates every 2.5s

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/number-ticker

Import the shared styles once in your application.

TSUsage
import NumberTicker from '@/components/beui/numeric/NumberTicker.vue'
import '@/components/beui/styles.css'

API Reference

value
number
Default—
pad?
number

Digits to pad to (left).

Default—
decimals?
number

Fraction digits to keep. The value is rounded before `format` runs.

Default0
duration?
number

Per-digit roll duration in seconds.

Default0.9
stagger?
number

Stagger between digits.

Default0.04
startOnView?
boolean

Render only after the element enters the viewport.

Defaulttrue
prefix?
string
Default—
suffix?
string
Default—
blur?
boolean

Add a small blur during digit rolls.

Defaultfalse
className?
string
Default—
digitClassName?
string
Default—
locale?
boolean | string

Locale group separators. `true` uses the runtime locale; a tag pins it.

Default—
format?
(value: number) => string

Custom formatter.

Default—

Animated Number

AnimatedNumber.vue

Monthly recurring revenue

$0

+12.4% vs last month

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/animated-number

Import the shared styles once in your application.

TSUsage
import AnimatedNumber from '@/components/beui/numeric/AnimatedNumber.vue'
import '@/components/beui/styles.css'

API Reference

value
number
Default—
duration?
number
Default1.2
format?
(n: number) => string
DefaultMath.round(n).toLocaleString()
className?
string
Default—
startOnView?
boolean
Defaulttrue
Also on React Native. Rolling tickers and count-ups.(opens in a new tab)

Updated