Getting StartedComponentsDesign TokensThemingTheme SynthesizerFrameworksAccessibilityUtilitiesServer RenderingBrowser SupportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting StartedFrameworksServer RenderingDesign TokensThemingTheme SynthesizerTypographyUtilitiesAll ComponentsAccessibilityBrowser SupportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Animated Number

Count-up/down number animation with formatting options.

ComponentsAnimated Number
datastatic
<arc-animated-number>

Overview

AnimatedNumber transitions between numeric values using `requestAnimationFrame` with an ease-out-expo curve, the "counting up" effect seen in dashboards, stat cards, and hero metrics. When the `value` attribute changes, the component interpolates from the current displayed number to the new target over the specified duration. The ease-out-expo easing produces a fast start that decelerates toward the target, which draws attention to the final number. Duration defaults to 1000ms. Use 500ms for small increments in real-time dashboards and 2000ms for hero reveals on landing pages. Formatting is built in: `prefix` and `suffix` strings wrap the number (e.g. "$" and "K"), and `decimals` controls fixed decimal places. The `format` property switches between `number`, `currency`, and `percent` modes, each powered by `Intl.NumberFormat` for locale-aware formatting: thousands separators, decimal marks, and grouping all follow the configured `locale`. The default locale is `en-US`, but you can pass any BCP 47 tag (e.g. `de-DE`, `ja-JP`) for international formatting. The animation respects `prefers-reduced-motion` by snapping directly to the target value without animation.

Guidelines

When to use

  • Use in dashboard stat cards and hero metrics
  • Set decimals="2" for currency values and decimals="0" for counts
  • Use prefix="$" or suffix="%" for contextual formatting
  • Keep duration under 2000ms; longer animations feel sluggish
  • Combine with ValueCard or Stat for metric displays

When not to use

  • Do not animate more than 4-5 numbers simultaneously; it becomes distracting
  • Do not use for rapidly changing real-time values, because the animations queue up and feel laggy
  • Do not set duration below 200ms, where the animation becomes imperceptible
  • Do not animate between extremely different magnitudes (1 to 1,000,000), where the counting is meaningless
  • Do not use for static numbers that never change. Add animation only when values update

Features

  • Count-up/down animation using requestAnimationFrame
  • Ease-out-expo easing
  • Configurable duration
  • Prefix and suffix strings for currency, units, and labels
  • Fixed decimal place control via decimals attribute
  • Intl.NumberFormat-powered formatting with currency, percent, and number modes
  • Configurable locale for international number formatting
  • Respects `prefers-reduced-motion` by snapping to final value

Preview

Usage

<!-- Revenue counter -->
<arc-animated-number value="12847" prefix="$" duration="1500"></arc-animated-number>

<!-- Percentage with decimals -->
<arc-animated-number value="94.7" suffix="%" decimals="1"></arc-animated-number>

<!-- User count -->
<arc-animated-number value="3200" suffix=" users"></arc-animated-number>

API

valuenumber0
Target number to animate to
prefixstring''
String prepended before the number (e.g., "$")
suffixstring''
String appended after the number (e.g., "%")
decimalsnumber0
Number of fixed decimal places
localestring'en-US'
BCP 47 locale tag passed to Intl.NumberFormat for locale-aware number formatting (thousands separators, decimal marks).
durationnumber1000
Animation duration in milliseconds
format'number' | 'currency' | 'percent''number'
Controls how the number is formatted using Intl.NumberFormat. Use currency with a prefix like $ or percent with a suffix like %.

See Also