Skip to content

React e-commerce components

Free React e-commerce components: product cards, cart line items, quantity steppers, coupon inputs, shipping address, order summary and checkout blocks.

9 itemsFree, MITshadcn CLI compatibleTailwind CSS v4Light and dark

Commerce components cover the shop grid (ProductCard, WishlistButton), the cart (CartLineItem, QuantityStepper, CouponInput) and checkout (ShippingAddress, OrderSummary, CheckoutSummary). CommerceCheckout is a full two-column checkout whose totals recompute as quantities change.

They render the state you pass in, so any cart or payment backend works. Prices are preformatted strings: format them with Intl.NumberFormat before passing them in. ShippingAddress inputs carry name attributes and autofill tokens, so reading the form with FormData picks them up.

Which one should I use?

You needUseWhy
A product in a gridProduct CardImage, title, price, add to cart
Save for laterWishlist ButtonHeart toggle, aria-pressed
A row in a cartCart Line ItemQuantity and remove
Change a small quantityQuantity StepperClamped to min and max
A promo codeCoupon InputResult shown inline and announced
A shipping addressShipping AddressAutofill tokens, FormData names
Totals with tax and discountsOrder SummaryDescription list
A compact pay panelCheckout SummaryItems, total, one pay button
A one-page checkoutCommerce CheckoutSummary stacks on mobile

9 items

npx shadcn@latest add @minidev/cart-line-item @minidev/checkout-summary @minidev/coupon-input @minidev/order-summary @minidev/product-card @minidev/quantity-stepper @minidev/shipping-address @minidev/wishlist-button @minidev/commerce-checkout

Components 8

  • React shopping cart row with product title, unit price, a quantity stepper and an optional remove button. Callbacks report quantity changes and removals.

    npx shadcn@latest add @minidev/cart-line-item
  • Tailwind order summary card listing line items and prices, a divided total row and a full width Pay now button. Fits the side column of a checkout.

    npx shadcn@latest add @minidev/checkout-summary
  • Promo code field with an Apply button and inline success or error messages. The demo validation is easy to replace with your own check in React.

    npx shadcn@latest add @minidev/coupon-input
  • A checkout summary card listing line items such as subtotal, shipping and tax, then a separator and a bold total. Built with React for cart pages.

    npx shadcn@latest add @minidev/order-summary
  • A storefront product tile with a square image, an optional corner badge like Sale or New, the product title, price and an Add to cart button when onAdd is set.

    npx shadcn@latest add @minidev/product-card
  • React quantity stepper with minus and plus buttons around a tabular count. Clamps to min and max, disables at the limits, and works controlled or uncontrolled.

    npx shadcn@latest add @minidev/quantity-stepper
  • Shipping address form with full name, street address, city and postal code fields, each with the right autocomplete attribute for browser autofill at checkout.

    npx shadcn@latest add @minidev/shipping-address
  • A Tailwind heart icon button for product cards that toggles a wishlist state. It sets aria-pressed and switches its label between add and remove.

    npx shadcn@latest add @minidev/wishlist-button

Blocks and full pages 1

  • A two column React checkout page with an editable cart line item, a shipping address form, and an order summary with subtotal, tax, total and a pay button.

    npx shadcn@latest add @minidev/commerce-checkout

Using an AI coding agent? Read the agent guide, point it at /llms.txt for the full index, or paste /AGENTS.md into your project. Every component has plain Markdown docs at /docs/<name>.md.

See them live

Galleries render these components with sample data in every state.

Frequently asked questions

Is there a full checkout page?

Yes. CommerceCheckout has line items and a billing address on the left and a live order summary with Pay on the right. Totals recompute as quantities change, and the summary stacks under the form on small screens.

Do these work with Shopify or Stripe?

Yes. They are UI components, so you load cart and product data from your backend, Shopify's Storefront API or Stripe, and render it with them.

How do I validate a coupon code?

CouponInput calls onApply with the code. Check it on your server and return true for a valid code, or false or an error message for an invalid one; a Promise works too. The result is shown inline and announced to screen readers.

How should I format prices?

Format them before passing them in, with Intl.NumberFormat and style: "currency". Keep amounts in minor units (cents) on the server so totals add up exactly.