Compose the value and the period.
plan-price.tsx
Price
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| 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"). |
| currency | string | — | The ISO 4217 code of every value inside. Default "USD". It sets the minor digits (0 for JPY). |
| locale | string | — | The BCP 47 locale. Default: the DisplayLocaleProvider locale, else "en-US". |
| minor | "always""auto" | — | auto (default): "$49", "$49.50". always: the minor digits on every value ("$49.00"). |
| labels | Partial<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>| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | null | — | The price. null, undefined, and NaN show the empty text. |
| end | number | null | — | The end of a range ("$10–20"): Intl writes the shared parts once. A range never rolls. |
| free | boolean | false | A price of 0 writes the free word of the Price labels ("Free"). Default false: "$0". |
| from | boolean | false | The from word of the Price labels before the price, for "at least" ("From $49"). |
| compact | boolean | false | $1.2M from 10,000 (the compactCurrency kind). |
| animated | boolean | false | Rolls the digits on a change (the Rolling Number), on the panel clock. Default false. |
| children | ReactNode | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
PriceWas
<del>PriceNote
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| 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>| Prop | Type | Default | Description |
|---|---|---|---|
| data-slot | string | — | 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. |
Built with
Installs with Price
- Components
- Badge,Rolling Number



