# PlanPrice Component The PlanPrice component is a React component used to display a plan's price with a currency and a discount, if any. It can be used anywhere where a plan's price is required. If you want to emphasize that a plan's price is discounted, use two `` components as below and wrap them in a flexbox container. ## Usage PlanPrice can take a `productDisplayPrice` or a `rawPrice` prop. A `productDisplayPrice` can be retrieved from the `/purchases` or `/plans` REST endpoints and are stored in Redux; for example: ```jsx function MyComponent( { purchaseId } ) { const { productDisplayPrice } = useSelector( ( state ) => getByPurchaseId( state, purchaseId ) ); return ; } ``` ```jsx ; ``` ```jsx ; ``` If you pass an array of two numbers in the `rawPrice` prop, a range of prices will be displayed. ```jsx import { PlanPrice } from '@automattic/components'; export default class extends React.Component { static displayName = 'MyPlanPrice'; render() { return (
); } } ```