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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@veeyaainnovatives/pricing-card

v1.0.0

Published

A reusable Pricing/Subscription card component for React applications

Readme

@veeyaainnovatives/pricing-card

A reusable Pricing/Subscription card component for React applications.

Features

  • 💳 Flexible pricing display (single price or range)
  • 🎨 Customizable card variants
  • 📋 Support for features/sections with items
  • 🔧 Highly configurable with CSS classes
  • 💰 Built-in price formatting
  • 📱 Fully responsive

Installation

npm install @veeyaainnovatives/pricing-card

Peer Dependencies

This package requires the following peer dependencies:

  • react (^16.8.0 || ^17.0.0 || ^18.0.0)
  • react-dom (^16.8.0 || ^17.0.0 || ^18.0.0)
  • react-bootstrap (^2.0.0)

Usage

Basic Example

import { PricingCard } from '@veeyaainnovatives/pricing-card';

function App() {
  const handleClick = (id, title) => {
    console.log('Selected plan:', id, title);
  };

  return (
    <PricingCard 
      id={1}
      title="Basic Plan"
      shortDescription="Perfect for individuals"
      startPrice={6999}
      endPrice={12999}
      priceUnit="month"
      onButtonClick={handleClick}
    />
  );
}

Advanced Example with Features

import { PricingCard } from '@veeyaainnovatives/pricing-card';

function App() {
  const plan = {
    id: 1,
    title: "Pro Plan",
    shortDescription: "For growing businesses",
    mainDescription: "Everything you need to scale",
    startPrice: 18000,
    endPrice: 45000,
    priceUnit: "month",
    sections: [
      {
        title: "Features",
        items: [
          "Unlimited projects",
          "Priority support",
          "Advanced analytics",
          "Custom integrations"
        ]
      },
      {
        title: "Support",
        items: [
          "24/7 email support",
          "Phone support",
          "Dedicated account manager"
        ]
      }
    ]
  };

  return (
    <PricingCard 
      {...plan}
      onButtonClick={(id, title) => handleSubscribe(id, title)}
      variant="middle"
    />
  );
}

With Custom Formatting

import { PricingCard } from '@veeyaainnovatives/pricing-card';

function App() {
  const customFormatPrice = (price) => {
    return new Intl.NumberFormat('en-US', {
      style: 'currency',
      currency: 'USD',
      minimumFractionDigits: 0
    }).format(price);
  };

  return (
    <PricingCard 
      id={1}
      title="Elite Plan"
      startPrice={75000}
      priceUnit="month"
      formatPrice={customFormatPrice}
      onButtonClick={handleClick}
    />
  );
}

Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | id | string\|number | Yes | - | Unique identifier for the card | | title | string | No | "Plan" | Plan title | | shortDescription | string | No | - | Short description/subtitle | | mainDescription | string | No | - | Main description text | | startPrice | string\|number | No | - | Starting price | | endPrice | string\|number | No | - | Ending price (for price range) | | priceUnit | string | No | - | Price unit (e.g., "month", "year") | | sections | array | No | [] | Array of sections with items | | sections[].title | string | No | - | Section title | | sections[].items | array | No | - | Array of feature items (strings) | | buttonText | string | No | "Get Started" | Button text | | onButtonClick | function | No | - | Button click handler (id, title) => void | | variant | string | No | - | Card variant ("left", "middle", "right", or custom) | | className | string | No | "" | Additional CSS classes for the card | | titleClassName | string | No | "plan-title theme-color-green" | CSS classes for the title | | priceClassName | string | No | "price-text" | CSS classes for the price | | buttonClassName | string | No | "pricing-btn w-100 mt-3" | CSS classes for the button | | formatPrice | function | No | - | Custom price formatter (price) => string |

Data Structure

Basic Plan Object

{
  id: 1,
  title: "Basic Plan",
  shortDescription: "Perfect for individuals",
  mainDescription: "All essential features",
  startPrice: 6999,
  endPrice: 12999,
  priceUnit: "month"
}

Plan with Features

{
  id: 2,
  title: "Pro Plan",
  shortDescription: "For growing businesses",
  startPrice: 18000,
  priceUnit: "month",
  sections: [
    {
      title: "Features",
      items: [
        "Feature 1",
        "Feature 2",
        "Feature 3"
      ]
    }
  ]
}

Styling

The component uses the following default CSS classes:

  • .pricing-card - Main card container
  • .plan-title - Title heading
  • .plan-subtitle - Short description
  • .price-text - Price display
  • .pricing-btn - Button
  • .features - Features list container

You can override these styles or add custom classes using the className props. Make sure to include your CSS styles in your application.

Variant Classes

The component supports variant classes for different card styles:

  • left-card - Left card variant (dark)
  • middle-card - Middle card variant (highlighted)
  • right-card - Right card variant (light)

You can pass these via the variant prop or use custom CSS classes.

Price Formatting

By default, prices are formatted using Indian locale (en-IN) with no decimal places. You can provide a custom formatter function via the formatPrice prop.

License

MIT

Author

Veeyaa Innovatives