Bundui.io

Sliding Number

Text 42

About

Here is Sliding Number component

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Sliding Number to your project and fits it to your theme.

Code

How Sliding Number is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { motion } from "motion/react";
import { useEffect, useState } from "react";
import { SlidingNumber } from "@/components/ui/sliding-number";

export default function SlidingNumberBasic() {
  const [value, setValue] = useState(0);

  useEffect(() => {
    if (value === 100) return;

    const interval = setInterval(() => {
      setValue(value + 1);
    }, 10);
    return () => clearInterval(interval);
  }, [value]);

  return (
    <motion.div
      initial={{ y: 0, fontSize: `${24}px` }}
      animate={{ y: 0, fontSize: `${24}px` }}
      transition={{
        ease: [1, 0, 0.35, 0.95],
        duration: 1.5,
        delay: 0.3
      }}>
      <div className="inline-flex items-center">
        <SlidingNumber value={value} />%
      </div>
    </motion.div>
  );
}

Dependencies

More by Bundui.io

View all
  • Fluid particles background

    Fluid particles background

    832
  • Floating paths

    Floating paths

    704
  • Text Gradient Scroll

    Text Gradient Scroll

    643
  • Stars

    Stars

    560
  • Image Comparison

    Image Comparison

    429
  • Magnetic Button

    Magnetic Button

    409
  • Marquee Effect

    Marquee Effect

    339
  • Wavy

    Wavy

    219

More in Text

View all
  • Motion Blur Text

    Motion Blur Text

    45
  • Rainbow Text Effect

    Rainbow Text Effect

    58
  • Short Slide Down

    Short Slide Down

    45
  • Blur Reveal

    Blur Reveal

    72
  • Text Reveal

    Text Reveal

    29
  • Apple Hello Effect

    Apple Hello Effect

    659
  • Text Highlight

    Text Highlight

    96
  • Scroll Fill Headline

    Scroll Fill Headline

    13