All components

Sliding Number Counter

Sliding Number Counter is a React and Tailwind CSS form component from Motion Primitives, licensed MIT. Copy it and paste it into your project.

Motion Primitives MIT forms

What it is

Sliding Number Counter is a React and Tailwind CSS form component from Motion Primitives, licensed MIT. Copy it and paste it into your project.

How to use it

Open it in the catalogue, press copy, and paste it into your project. The prompt you copy carries the code and the rules that tell your agent to reproduce it without changing anything.

Open in the catalogue

Four free copies a week. No card.

No packages beyond the project baseline

Licence

This component comes from Motion Primitives and is redistributed under the MIT licence, which permits commercial use. The copyright notice travels with the code.

Sliding Number Counter

app/docs/sliding-number/sliding-slider.tsx
'use client';
import { SlidingNumber } from '@/components/core/sliding-number';
import { useState } from 'react';

export function SlidingNumberWithSlider() {
  const [value, setValue] = useState(100);
  const [width, setWidth] = useState(0);

  return (
    <div className='flex flex-col items-start gap-0'>
      <div className='flex items-center gap-2 font-mono'>Current ARR:</div>
      <div className='inline-flex items-center gap-1 font-mono leading-none'>
        $<SlidingNumber value={value} />
      </div>
      <input
        type='range'
        value={value}
        min={500}
        max={100000}
        step={50}
        onChange={(e) => setValue(+e.target.value)}
        className='mt-2 accent-indigo-950'
      />
    </div>
  );
}

Similar components