Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Commerce

Price

Commerce

Price React component for Tailwind CSS v4

Order trackerPrice range
Live props
Content
price1200
currency
locale
fractionDigits
compareAtPriceNone
priceType
priceSuffix
caption
Appearance
showDiscount
saleTone
size
currencyStyle
Layout
layout
Behavior
animate
announce
Code
import { Price } from "@/components/ui/price"

<Price />
  1. Home
  2. Components
  3. Commerce
  4. Price
Pro

Price React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React price component written the way shops print prices: a smaller currency, a struck old price with a discount chip, Negotiable, Free.

A price is text: it reads in order ("$1,200, Negotiable", "$499, Was $649, 23% off") and nothing in it takes focus, a tap or a key. When the amount changes it fades to the new one, or rolls its digits like an odometer with animate="roll"; with announce a screen reader hears the new total once, never on mount. Under reduced motion the new value simply appears. On a narrow phone the amount never breaks; the old price, the chip and the captions wrap below it.

Price is a Pro React component in the React commerce components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add price, together with Animated Counter, Badge, useLocale, Commerce, Motion presets and 3 more and the npm package motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add price

Price is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import Price from @/components/ui/price.

import { Price } from "@/components/ui/price"

export function ListingPrice() {
  return (
    <div className="flex flex-col gap-3">
      <Price price={320} priceType="negotiable" labels={{ negotiable: "Or best offer" }} />
      <Price
        price={499}
        compareAtPrice={649}
        size="lg"
        layout="stacked"
        labels={{ compare: "Was", discount: (percent) => `Save ${percent}%` }}
      />
      <Price price={489000} unit={{ quantity: 580, unit: "sq ft" }} />
      <Price price={1900} priceSuffix="/mo" caption="Utilities not included" />
    </div>
  )
}

Props

  • price*default 1200
    number | null

    The amount in major units (dollars, not cents). null (or NaN) renders labels.onRequest ("Price on request").

  • currencydefault "USD"
    string

    ISO 4217 code, printed with its narrow symbol: "$", "€", "lei". An unknown code prints the number with the code ("1,200 XYZ").

  • localedefault ""
    string

    Intl locale for grouping, decimals and where the currency goes ("$1,200" in en-US, "1.200 €" in de-DE). Empty uses the UIProvider locale, then the page.

  • fractionDigitsdefault "auto"
    "auto" | "0" | "2" | number

    auto prints whole amounts without decimals ("$1,200") and the currency's digits otherwise ("$1,284.90"); a number (or "0" / "2") forces that many.

  • compareAtPricedefault 0
    number | null

    The old price. Shown struck through, with the sale color and the discount chip, only when it is above price (and above 0); 0 or null means none.

  • priceTypedefault "fixed"
    "fixed" | "negotiable" | "free" | "exchange" | "on-request"

    negotiable adds labels.negotiable after the amount; free, exchange and on-request replace the amount with their label (free in the success color).

  • priceSuffixdefault ""
    string

    Muted text after the currency: "/mo", "/night", "/each".

  • unit
    { quantity: number; unit: string }

    Adds the price per unit to the caption: $489,000 for 580 sq ft prints "$843/sq ft".

  • captiondefault ""
    ReactNode

    One muted line under the price ("Tax included", "+ $9.99 shipping"), after the unit price when both are set.

  • showDiscountdefault true
    boolean

    The "-25 %" chip next to the old price when on sale. Screen readers hear labels.discount instead of the chip.

  • saleTonedefault "danger"
    "neutral" | "brand" | "success" | "warning" | "danger" | "info"

    The sale amount's color and the chip's tone. A markdown is a status, so it defaults to danger; the two prices still say it without color.

  • sizedefault "md"
    "sm" | "md" | "lg" | "xl"

    14 / 17 / 22 / 32px amounts (xl grows to 40px from 768px): a cart line, a card, a detail page, a pricing hero.

  • currencyStyledefault "small"
    "small" | "inline"

    small sets the currency at 0.72em of the amount, in the locale's order; inline prints it at the same size.

  • layoutdefault "inline"
    "inline" | "stacked"

    inline keeps everything on one line and wraps between parts; stacked puts the old price, the chip and Negotiable on a second line (cards, plans).

  • animatedefault "fade"
    "none" | "fade" | "roll"

    How a new amount appears: a quick keyed fade, digits rolling like an odometer (totals, plans), or nothing. Reduced motion always swaps instantly.

  • announcedefault false
    boolean

    Reads a changed price out politely through a live region (cart and checkout totals). Never on mount.

  • labels
    Partial<PriceLabels>

    Copy: negotiable "Negotiable", free "Free", exchange "Swap", onRequest "Price on request", compare "Was" (sr-only before the old price), discount (percent) => "25% off" (sr-only when the chip shows). Pass only the keys you translate.

  • classNames
    Partial<Record<"current" | "amount" | "currency" | "suffix" | "label" | "compare" | "discount" | "negotiable" | "caption", string>>

    Extra classes for the inner parts.

  • className
    string

    Extra classes for the root span, merged last. Other span props (id, aria-*, data-*) spread onto it.

Parts

  • PRICE_SIZES

    constant

    The type classes of each size (amount, compare, caption and the badge size), for bars and tables that print a price without the component but should match it.

  • DEFAULT_PRICE_LABELS

    constant

    The English copy: negotiable "Negotiable", free "Free", exchange "Swap", onRequest "Price on request", compare "Was" and discount "25% off".

Examples

Sale in every size

An old price struck through with its discount chip, inline and stacked.

Listing types

Negotiable after the amount; free, swap and on request instead of it.

Real estate

The price per unit of area as a caption, in dollars and in euros.

Rent and stays

A muted suffix after the currency, with a brand sale tone.

A changing total

Digits roll as the quantity changes and the new total is announced.

Locales

Grouping, decimals and the currency's side follow the locale.

B2B caption

A muted line under the amount for prices before tax.

Dependencies

motionanimated-counterbadgeuse-localecommercemotionnumber-formattonesui-config

Files

  • components/ui/price.tsx

FAQ

Is the React Price component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Price?

Run npx wingo-ui@latest add price. It also adds the Wingo UI items it builds on (Animated Counter, Badge, useLocale, Commerce, Motion presets and 3 more) and the npm package motion. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/price.

See also

Listing cardPrice rangeCart drawerPricing tableCurrency InputAnimated Counter

Used in

Listing cardMobile App HomeOrder trackerCheckout stepsCart drawerPricing tablePricing SectionInbox PageListing Detail PageOrder History PageStorefront Page

More React commerce components

Coupon inputCategory pickerFilter panelProduct galleryFavorite buttonListing grid
All 16 React commerce components
PreviousOrder trackerNext Price range
City bike

City bike, 26-inch wheels, 3 gears

$1,200

Brooklyn, New York · Today at 2:32 PM

formatPrice → "$1,200"fractionDigits="auto"animate="fade" · announce=false

Nudge the price to watch it fade