PricingSlider

Usage-based pricing. Drag the jelly thumb through tiers; the label rides its bubble and the price rolls. Pricing.

Open playground

API plan

Slide to your expected usage.

250k requests

79

  • 99.9% uptime
  • Email support
  • Usage dashboard

About

PricingSlider is a React component in the Pricing category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { PricingSlider } from "@ashutoshswamy/smoui" and set steps, title, onSelect.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { PricingSlider } from "@ashutoshswamy/smoui";

<PricingSlider
  steps={[{ label: "10k requests", price: 9 }, { label: "50k requests", price: 29 }]}
  features={["Usage dashboard"]}
  onSelect={(step) => checkout(step)}
/>

Props 3

steps

Tiers, smallest first. price is per month.

{ label: string; price: number }[]
title / features / cta

Card content.

ReactNode / string[] / string
onSelect

Called with the chosen tier.

(step: PricingStep) => void