Price Roller

A pricing display that animates numbers rolling into place.

$012345678901234567890123456789/mo

Installation

1

Run the following Command

>_npx shadcn@latest add https://minimal-ui-eta.vercel.app/r/priceroller.json

Props

PropTypeDefaultDescription
classNamestringundefinedOptional custom CSS classes for the root container.
plansPricePlan[]Monthly / Yearly defaultsBilling plans with id, label, and price. Each plan drives the animated ticker value.
defaultPlanIdstring"monthly"Initial selected plan when used in uncontrolled mode.
valuestringundefinedSelected plan id for controlled usage.
onChange(planId: string) => voidundefinedCalled when the user switches billing plans.
currencySymbolstring"$"Symbol shown before the animated price.
suffixstring"/mo"Text shown after the animated price.
layoutIdstring"active-pill"Framer Motion layoutId for the active pill. Use unique values when rendering multiple rollers.
priceClassNamestringundefinedOptional classes for the price display wrapper.
currencyClassNamestringundefinedOptional classes for the currency symbol.
suffixClassNamestringundefinedOptional classes for the suffix text.
switchClassNamestringundefinedOptional classes for the segmented switch container.