GitHub Stars

Price

A flexible price display component for showing pricing information.

$99.00 / month

Installation

npx shadcn@latest add @fulldev/price

Usage

import { Price, PriceUnit, PriceValue } from "@/components/ui/price"
<Price>
  <PriceValue price={99} />
  <PriceUnit>month</PriceUnit>
</Price>

Examples

€29.00 / month
$79.00$99.00 Save 20% / month
$50.00 - $100.00 / month
$249.00$299.00 Save $50.00

Notes

  • Use compareAt to show the original price and automatic savings output.
  • Pass currency and locale when the default USD and en-US formatting are not correct for your project.
  • Use showDiscount={false} when you want the strike-through price without the savings badge.

API Reference

See the GitHub source code for more information on props.