Saturation UIsaturation UI
DocsComponentsBlocks
⌘K

Getting Started

IntroductionInstallationTheming

Components

AccordionAI Chat InputAlertAnimated GroupAnimated NumberAvatarBadgeBorder TrailBreadcrumbButtonButton GroupCalendarCardChartCheckboxCollapsibleComboboxCommandContext MenuData TableDate PickerDialogDropdown MenuEmptyFieldGlow EffectInputInput GroupItemKbdMenubarNovel EditorPaginationProgressive BlurProgressSelectSheetSkeletonSonnerSpinnerSpotlightSwitchTableTabsText EffectText ShimmerTextareaToggleToggle GroupTreeTypography
Components
/
Animated Number

Animated Number

A number component that smoothly animates between values with spring physics.

1,234

Installation

npx shadcn@latest add https://ui.saturation.io/r/animated-number.json

Usage

import { AnimatedNumber } from "@/components/ui/animated-number"

export default function Example() {
  const [count, setCount] = useState(0)

  return (
    <div>
      <AnimatedNumber value={count} className="text-2xl font-bold" />
      <button onClick={() => setCount(count + 1)}>Increment</button>
    </div>
  )
}

Examples

Counter

A simple counter with increment and decrement buttons.

0

Currency

Display animated currency values.

Total Amount
$1,234

Large Numbers

Animate large numbers with automatic comma formatting.

Total Views
1,234,000

Custom Spring

Customize the animation with spring options.

Score
0

Fade In Effect

Number loads from 99% of target value (1% less) with smooth, gradual animation that slows down naturally.

990,000

API Reference

PropTypeDefaultDescription
valuenumber-The number value to animate to
classNamestring-Additional CSS classes for styling
springOptionsSpringOptions-Motion spring configuration for animation behavior
asReact.ElementTypespanThe HTML element to render as

On This Page

  • Preview
  • Installation
  • Usage
  • Examples
    • Counter
    • Currency
    • Large Numbers
    • Custom Spring
    • Fade In Effect
  • API Reference

Deploy your Saturation UI app

Build beautiful, saturated interfaces with our component library.

Deploy to Vercel for the best performance and developer experience.