npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aniruddha1806/progress-tracker

v1.0.1

Published

A customizable progress tracker component for React applications

Readme

React Progress Tracker

A flexible, customizable progress tracker component for React applications with TypeScript support. Perfect for multi-step forms, onboarding flows, checkout processes, and any step-by-step user journey.

Installation

npm install @aniruddha1806/progress-tracker

Features

  • 🎨 Extensive customization options (colors, sizes, styles)
  • 📱 Responsive design with multiple size options
  • 🔧 Custom step rendering support
  • 🎭 Built-in icons and labels with sublabels
  • 📊 Visual state management (active, completed, inactive)
  • 🎨 CSS class and inline style support
  • 📝 TypeScript support with full type definitions
  • ♿ Accessibility-friendly structure
  • 🪶 Zero dependencies and lightweight

Quick Start

import ProgressTracker from '@aniruddha1806/progress-tracker';

function App() {
  const steps = [
    { 
      label: 'Account', 
      sublabel: 'Create your account',
      icon: '👤' 
    },
    { 
      label: 'Profile', 
      sublabel: 'Complete your profile',
      icon: '📝' 
    },
    { 
      label: 'Verification', 
      sublabel: 'Verify your email',
      icon: '✉️' 
    },
    { 
      label: 'Complete', 
      sublabel: 'All done!',
      icon: '✅' 
    }
  ];

  return (
    <ProgressTracker
      steps={steps}
      currentStep={1} // 0-indexed (step 2 is active)
    />
  );
}

Props

ProgressTrackerProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | steps | Step[] | required | Array of step objects | | currentStep | number | required | Current active step (0-indexed) | | className | string | "" | CSS class for container | | stepClassName | string | "" | CSS class for step elements | | labelClassName | string | "" | CSS class for step labels | | sublabelClassName | string | "" | CSS class for step sublabels | | iconClassName | string | "" | CSS class for step icons | | connectorClassName | string | "" | CSS class for connectors | | activeConnectorClassName | string | "" | CSS class for active connectors | | inactiveConnectorClassName | string | "" | CSS class for inactive connectors | | activeColor | string | "#0074D9" | Color for active/completed steps | | inactiveColor | string | "#E1E8ED" | Color for inactive steps | | showLabels | boolean | true | Show step labels | | showConnectors | boolean | true | Show connectors between steps | | size | "small" \| "medium" \| "large" | "medium" | Overall component size | | renderCustomStep | function | undefined | Custom step render function |

Step Interface

interface Step {
  label: string;           // Step title
  sublabel?: string;       // Optional subtitle
  icon: React.ReactNode;   // Icon (emoji, SVG, component)
}

Examples

Basic Horizontal Progress

Simple horizontal progress tracker:

import ProgressTracker from '@aniruddha1806/progress-tracker';

function BasicExample() {
  const steps = [
    { label: 'Start', icon: '🚀' },
    { label: 'Progress', icon: '⚡' },
    { label: 'Complete', icon: '🎉' }
  ];

  return (
    <ProgressTracker
      steps={steps}
      currentStep={1}
    />
  );
}

Custom Colors and Styling

Customize appearance with colors and CSS classes:

import ProgressTracker from '@aniruddha1806/progress-tracker';
import './custom-progress.css'; // Your custom CSS

function CustomStyledExample() {
  const steps = [
    { label: 'Design', icon: '🎨' },
    { label: 'Develop', icon: '💻' },
    { label: 'Test', icon: '🧪' },
    { label: 'Deploy', icon: '🚀' }
  ];

  return (
    <ProgressTracker
      steps={steps}
      currentStep={2}
      activeColor="#28a745"
      inactiveColor="#f8f9fa"
      size="large"
      connectorStyle="dashed"
      className="custom-progress"
      stepClassName="custom-step"
      labelClassName="custom-label"
    />
  );
}

CSS file (custom-progress.css):

.custom-progress {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
}

.custom-step {
  transition: transform 0.2s ease;
}

.custom-step:hover {
  transform: scale(1.05);
}

.custom-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: white;
}

With React Icons

Use popular icon libraries:

import ProgressTracker from '@aniruddha1806/progress-tracker';
import { 
  FaUser, 
  FaCreditCard, 
  FaShippingFast, 
  FaCheckCircle 
} from 'react-icons/fa';

function IconExample() {
  const steps = [
    { 
      label: 'Account', 
      sublabel: 'Sign up or login',
      icon: <FaUser /> 
    },
    { 
      label: 'Payment', 
      sublabel: 'Enter payment details',
      icon: <FaCreditCard /> 
    },
    { 
      label: 'Shipping', 
      sublabel: 'Choose delivery option',
      icon: <FaShippingFast /> 
    },
    { 
      label: 'Confirmation', 
      sublabel: 'Order complete',
      icon: <FaCheckCircle /> 
    }
  ];

  return (
    <ProgressTracker
      steps={steps}
      currentStep={1}
      activeColor="#007bff"
      size="large"
    />
  );
}

Different Sizes

Show all available sizes:

import ProgressTracker from '@aniruddha1806/progress-tracker';

function SizesExample() {
  const steps = [
    { label: 'Start', icon: '🚀' },
    { label: 'Middle', icon: '⚡' },
    { label: 'End', icon: '🎉' }
  ];

  return (
    <div style={{ padding: '20px' }}>
      <h3>Small Size</h3>
      <ProgressTracker
        steps={steps}
        currentStep={1}
        size="small"
        activeColor="#dc3545"
      />
      
      <h3 style={{ marginTop: '40px' }}>Medium Size (Default)</h3>
      <ProgressTracker
        steps={steps}
        currentStep={1}
        size="medium"
        activeColor="#ffc107"
      />
      
      <h3 style={{ marginTop: '40px' }}>Large Size</h3>
      <ProgressTracker
        steps={steps}
        currentStep={1}
        size="large"
        activeColor="#28a745"
      />
    </div>
  );
}

TypeScript Usage

The component provides full TypeScript support:

import ProgressTracker, { Step, ProgressTrackerProps } from '@aniruddha1806/progress-tracker';
import { ReactNode } from 'react';

interface CustomStep extends Step {
  id: string;
  duration?: number;
  isOptional?: boolean;
}

interface WizardProps {
  steps: CustomStep[];
  onStepChange: (stepIndex: number) => void;
}

const CustomWizard: React.FC<WizardProps> = ({ steps, onStepChange }) => {
  const [currentStep, setCurrentStep] = useState<number>(0);

  const handleStepClick = (stepIndex: number): void => {
    setCurrentStep(stepIndex);
    onStepChange(stepIndex);
  };

  const renderCustomStep = (
    step: Step, 
    index: number, 
    isCompleted: boolean, 
    isActive: boolean
  ): ReactNode => {
    const customStep = step as CustomStep;
    
    return (
      <div
        key={customStep.id}
        onClick={() => handleStepClick(index)}
        style={{
          cursor: 'pointer',
          opacity: customStep.isOptional && !isCompleted ? 0.6 : 1
        }}
      >
        {/* Custom step rendering */}
      </div>
    );
  };

  const progressProps: ProgressTrackerProps = {
    steps,
    currentStep,
    renderCustomStep,
    activeColor: '#6366f1',
    size: 'large'
  };

  return <ProgressTracker {...progressProps} />;
};