saturation/uisaturation/ui
DocsComponentsBlocksPagesEmails
GitHub

Sections

IntroductionComponentsInstallationMCPThemingDesign

Components

Components

General

AvatarBadgeButtonKbdProgressSeparatorSkeletonSpin ResolveSpinnerSync ButtonTypography

Forms & Inputs

Address LookupCalendar PickerCheckboxComboboxDate PickerEmoji PickerFavicon SearchFieldInputInput GroupInput OTPRadio GroupSelectSliderSwitchTextareaToggleToggle Group

Data Display

AccordionAlertCardChartComparison SliderCredit CardData TableEmptyItemSaturation Credit CardTableTree

Navigation

BreadcrumbCommandMenubarNavigation MenuPaginationTabs

Overlays

CollapsibleContext MenuDialogDropdown MenuSheet

Layout

Button GroupFont ProviderWizard Split Layout

Feedback

Sonner

Animation & Effects

Animated GroupAnimated ListAnimated NumberBeamBlur FadeBorder TrailGlow EffectLiquid MetalLoading StateParallaxPixelProgressive BlurRippleSpotlightText EffectText Shimmer

Productivity

Agent ChatAI Chat InputCoding AgentFiltersFull CalendarKanbanNovel Editor
Docs/Components/Animated Number

Animated Number

Animates a number value with smooth transitions.

Loading...

Installation

pnpm dlx shadcn@latest add @saturation-ui/animated-number

Tailwind v4 — Source Scanning

The public shadcn registry installs component source into your project. If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:

@source "../components";

This ensures all utility classes in CVA variants and data attribute selectors are included in your build.

Usage

import { AnimatedNumber } from "@/components/ui/animated-number"
<AnimatedNumber value={1234} />

Examples

Currency

Loading...
Currency display with $ prefix.

Large Numbers

Loading...
Large numbers with locale formatting.

Custom Spring

Loading...
Custom spring physics animation.

Fade In Effect

Load Budget

980,100

Loads from 99% of target with a gradual animation

Gradual fade-in animation from near-target value.

API Reference

PropTypeDefaultDescription
value*number—The target number to animate toward.
classNamestring—Additional CSS classes.
springOptionsSpringOptions—Motion spring configuration for the animation.
asReact.ElementTypespanThe HTML element type to render.
PreviousAnimated ListNextAvatar

On This Page

  • Installation
  • Usage
  • Examples
  • Currency
  • Large Numbers
  • Custom Spring
  • Fade In Effect
  • API Reference
1,000

Total Amount

$1,234

Total Views

1,234,000

Score

0