Toggle Sidebar B
AppearanceLight & dark mode D

Counter

Flexible animated counter supporting increments + easing.

Default

Use the buttons or the value slider to roll the digits. Every prop is wired to the controls underneath.

Dark previewReplay previewOpen in new tab
012345678901234567890123456789.0123456789

Customize

Value1
Gap10
Font Size80

API Reference

Counter

PropTypeDefaultDescription
valuenumberN/A (required)The numeric value to display in the counter.
fontSizenumber100The base font size used for the counter digits.
paddingnumber0Additional padding added to the digit height.
places(number | ".")[][100, 10, 1 , "." , 0.1]Defines which digit positions to display. Include whole number and decimal place values (use "." for the decimal point). If omitted, place values will be detected automatically.
gapnumber8The gap (in pixels) between each digit.
borderRadiusnumber4The border radius (in pixels) for the counter container.
horizontalPaddingnumber8The horizontal padding (in pixels) for the counter container.
textColorstringinheritThe text color for the counter digits.
fontWeightstring | numberinheritThe font weight of the counter digits.
containerStyleStyleValue{}Custom inline styles for the outer container.
counterStyleStyleValue{}Custom inline styles for the counter element.
digitStyleStyleValue{}Custom inline styles for each digit container.
gradientHeightnumber16The height (in pixels) of the gradient overlays.
gradientFromstring'black'The starting color for the gradient overlays.
gradientTostring'transparent'The ending color for the gradient overlays.
topGradientStyleStyleValueundefinedCustom inline styles for the top gradient overlay.
bottomGradientStyleStyleValueundefinedCustom inline styles for the bottom gradient overlay.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The digits are purely visual. If the value matters to screen reader users, render it as text elsewhere or add an aria-label on a wrapper.