MindeesUI
Blocks

Commerce blocks

Fourteen accessible commerce blocks for product display, cart, and checkout — cards, grids, pricing, reviews, summaries, and forms. Pure UI, props-driven, no network.

Storefront and checkout building blocks composed from MindeesUI primitives. Blocks never fetch or mutate — map your domain models onto the shared UI shapes (Product, Review, CartLineItem, SummaryLine, OrderLineItem) and pass everything through props.

Import

import {
  ProductCard,
  ProductGrid,
  ProductDetails,
  PriceDisplay,
  DiscountBadge,
  ReviewsList,
  AddToCartButton,
  CartItem,
  CartSummary,
  CheckoutForm,
  AddressForm,
  OrderSummary,
  OrderStatus,
  CouponInput,
} from '@mindees/blocks';

Usage

<ProductGrid
  products={products}
  numColumns={2}
  onPressProduct={(p) => navigate('product', { id: p.id })}
  onAddToCart={(p) => addToCart(p)}
/>

Blocks

PriceDisplay

Formatted price with optional struck-through compare-at value and a discount badge.

PropTypeDescription
pricenumberCurrent selling price.
compareAtnumberOriginal price; struck through when higher than price.
currencystringISO 4217 currency code. Defaults to "USD".
localestringBCP-47 locale for formatting.
showDiscountbooleanShow a discount percentage badge when a compare-at applies.
size'body' | 'bodyLg' | 'h5' | 'h4' | 'h3'Type scale for the current price. Defaults to 'h4'.

DiscountBadge

Small toned badge driven by percent or an explicit label.

PropTypeDescription
percentnumberRenders -N%. Ignored when label is set.
labelstringExplicit label (e.g. "SALE"). Overrides percent.
tone'danger' | 'success' | 'warning' | 'primary'Badge tone. Defaults to 'danger'.

AddToCartButton

Add-to-cart action with an optional inline quantity stepper and in-cart state.

PropTypeDescription
onAdd(quantity: number) => voidCalled with the chosen quantity when added.
loadingbooleanShows a spinner and disables interaction.
inCartbooleanRenders the "in cart" affordance.
showQuantitybooleanShow a quantity stepper beside the button.
initialQuantitynumberInitial quantity. Defaults to 1.
maxQuantitynumberMaximum quantity. Defaults to 99.
labelstringButton label. Defaults to "Add to cart".
fullWidthbooleanFill the container width. Defaults to true.

ProductCard

Single product surface with image, price, and an optional add-to-cart button.

PropTypeDescription
productProductProduct to render.
onAddToCart(product: Product) => voidCalled when the add-to-cart button is pressed.
onPress(product: Product) => voidCalled when the card body is pressed.
hideAddToCartbooleanHide the add-to-cart button.

ProductGrid

FlatList-backed grid of ProductCards.

PropTypeDescription
productsreadonly Product[]Products to render.
numColumnsnumberNumber of columns. Defaults to 2.
onPressProduct(product: Product) => voidCalled when a card is pressed.
onAddToCart(product: Product) => voidCalled when a card's add-to-cart is pressed.
hideAddToCartbooleanHide the add-to-cart button on every card.
ListEmptyComponentFlatList['ListEmptyComponent']Rendered when products is empty.
ListHeaderComponentFlatList['ListHeaderComponent']Header slot above the grid.
scrollEnabledbooleanDisable internal scrolling when nested.

ProductDetails

Full product view with image gallery, price, rating, and add-to-cart.

PropTypeDescription
productProductProduct to display; uses images for the gallery.
onAddToCart(product: Product, quantity: number) => voidCalled with the chosen quantity.
addingToCartbooleanLoading state for the add-to-cart action.
maxQuantitynumberMaximum quantity. Defaults to 99.

ReviewsList

Vertical list of star ratings and review text.

PropTypeDescription
reviewsreadonly Review[]Reviews to render.
titlestringOptional heading above the list.
ListEmptyComponentFlatList['ListEmptyComponent']Rendered when reviews is empty.
scrollEnabledbooleanDisable internal scrolling when nested.

CartItem

Single cart row with a quantity stepper and remove control.

PropTypeDescription
itemCartLineItemLine item to render.
onChangeQty(id: string, quantity: number) => voidCalled with the item id and new quantity.
onRemove(id: string) => voidCalled when the remove control is pressed.
maxQuantitynumberMaximum quantity. Defaults to 99.

CartSummary

Subtotal/shipping/tax rows plus an emphasized total and a checkout button.

PropTypeDescription
linesreadonly SummaryLine[]Summary rows (subtotal, shipping, tax, …).
totalnumberFinal total, emphasized below a divider.
totalLabelstringTotal row label. Defaults to "Total".
currencystringISO 4217 currency code. Defaults to "USD".
localestringBCP-47 locale for formatting.
onCheckout() => voidCheckout handler; omit to hide the button.
checkoutLabelstringCheckout label. Defaults to "Checkout".
loadingbooleanLoading state for the checkout button.
disabledbooleanDisable the checkout button.

CheckoutForm

Contact + shipping form that emits a CheckoutValues object on submit.

PropTypeDescription
onSubmit(values: CheckoutValues) => voidCalled with contact + shipping details.
loadingbooleanDisable inputs and show a spinner.
errorstringTop-level error message.
errors{ email?: string; phone?: string }Per-field validation errors for contact fields.
addressErrorsPartial<Record<keyof AddressValue, string>>Validation errors for shipping address fields.
submitLabelstringPlace-order label. Defaults to "Place order".
footerReactNodeSlot above the submit button, e.g. an order summary.

AddressForm

Controlled or self-managed address form with per-field errors.

PropTypeDescription
valuePartial<AddressValue>Controlled value; omit to self-manage state.
onChange(value: AddressValue) => voidCalled on every field change in controlled mode.
onSubmit(value: AddressValue) => voidCalled with the address when submitted.
submitLabelstringSubmit label; omit onSubmit to hide the button.
loadingbooleanDisable inputs and show a spinner.
errorsPartial<Record<keyof AddressValue, string>>Per-field validation errors.

OrderSummary

Read-only order line items with optional extra rows and an emphasized total.

PropTypeDescription
itemsreadonly OrderLineItem[]Read-only order line items.
totalnumberOrder total, emphasized.
linesreadonly SummaryLine[]Optional extra rows (shipping, tax, …).
titlestringOptional heading.
totalLabelstringTotal row label. Defaults to "Total".
currencystringISO 4217 currency code. Defaults to "USD".
localestringBCP-47 locale for formatting.

OrderStatus

Fulfilment stepper driven by an OrderStatusValue with a status badge.

PropTypeDescription
statusOrderStatusValueCurrent status; drives the active step and badge tone.
stepsreadonly StepperStep[]Ordered steps. Defaults to placed → processing → shipped → delivered.
orientation'horizontal' | 'vertical'Stepper orientation. Defaults to 'horizontal'.
hideBadgebooleanHide the status badge above the stepper.

CouponInput

Apply/remove coupon field with applied and error states.

PropTypeDescription
onApply(code: string) => voidCalled with the trimmed, upper-cased code on apply.
onRemove() => voidCalled when an applied coupon is removed; omit to hide.
appliedstringThe currently applied coupon code.
errorstringValidation / redemption error message.
loadingbooleanLoading state for the apply action.
placeholderstringInput placeholder. Defaults to "Coupon code".
applyLabelstringApply button label. Defaults to "Apply".
uppercasebooleanForce the input to upper case. Defaults to true.

All blocks also accept a style prop spread onto the root container.

On this page