E-Commerce
Price Display
Formatted price with optional struck-through compare-at price and a percentage-off badge, in three sizes.
$ velocityx add price-display Built for astro.
Needs a licence key —
subscribe here, then
velocityx loginonce.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| price | number | Yes | ||
| compareAtPrice | number | No | ||
| currency | string | No | 'AUD' | |
| locale | string | No | 'en-AU' | |
| size | 'sm' | 'md' | 'lg' | No | 'md' | |
| showBadge | boolean | No | true | |
| className | string | No | '' |
File this creates
The CLI writes this path into your project, relative to its root — nothing else moves.
components/velocity/price-display/PriceDisplay.astro Using the Price Display component
Install it with velocityx add price-display.
The CLI writes the source straight into your project — no runtime dependency, no registry
lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.
Related components
More from E-Commerce.
Order totals block listing subtotal, shipping, tax and discount rows that only render when passed, plus a grand total.
astroResponsive image-and-label tile grid linking into catalogue categories, with an optional item count.
astroCentred placeholder for an empty cart with icon, copy and a continue-shopping CTA.
astroPost-checkout success panel with order number, delivery estimate, line items and total paid.
astro