Skip to content

Price

Free

Shows a price with its currency, cents, period, and the old price before a discount. Use it in a line of text or as the large price of a pricing card.

  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Compose the value and the period.

plan-price.tsx

Price

<span>
PropTypeDefaultDescription
variant"display""inline""inline"inline (default): the price in a line of text ("$27.99 / month"). display: a pricing card price, the currency and the minor part small and high ("$79⁵⁰"), the period under the minor part.
was"before""below""before"Where PriceWas goes: before (default), in the line before the price; below, on a line of its own under the price, with what follows it ("$183 $107.40 billed yearly").
currencystring—The ISO 4217 code of every value inside. Default "USD". It sets the minor digits (0 for JPY).
localestring—The BCP 47 locale. Default: the DisplayLocaleProvider locale, else "en-US".
minorDigits"always""auto"—auto (default): "$49", "$49.50". always: the minor digits on every value ("$49.00").
labelsPartial<PriceLabels>—The words (PriceLabels): "Free" and "From". Keep the object stable.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

PriceValue

<data>
PropTypeDefaultDescription
valueRequirednumber | null—The price. null, undefined, and NaN show the empty text.
endnumber | null—The end of a range ("$10–20"): Intl writes the shared parts once. A range never rolls.
freebooleanfalseA price of 0 writes the free word of the Price labels ("Free"). Default false: "$0".
frombooleanfalseThe from word of the Price labels before the price, for "at least" ("From $49").
compactbooleanfalse$1.2M from 10,000 (the compactCurrency kind).
animatedbooleanfalseRolls the digits on a change (the Rolling Number), on the panel clock. Default false.
childrenReactNode—A PriceEmpty part: the words of no price. With a price, they are not drawn.
...props<data> attributes—Every other attribute goes to the <data>, with a ref.

PricePeriod

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

PriceWas

<del>
PropTypeDefaultDescription
valueRequirednumber | null—The price before the discount. null, undefined, and NaN render nothing.
compactbooleanfalse$1.2M from 10,000 (the compactCurrency kind).
...props<del> attributes—Every other attribute goes to the <del>, with a ref.

PriceNote

<div>
PropTypeDefaultDescription
rounded"default""full"—
size"default""lg"—
variant"dashed""default""destructive""ghost""info""link""media""outline""secondary""success""warning""success"
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

PriceEmpty

<div>
PropTypeDefaultDescription
data-slotstring—The data-slot of the root: the item's own slot ("time-ago"). Default "empty-value".
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use variant="display" on a plan.
  • Use PriceWas for a discount: it is a del.
  • Set the size on the root, and size a part in em.

The old price is a del, so a screen reader can say it was removed.

The value is real text.

Value
none · with `animated`, the digits roll on a change

Built with

Installs with Price

  1. AddedPrice, with Badge, Rolling Number.
Open the release