Tally UI

ProductCard

ProductCard combines ProductImage, ProductTitle, and ProductPrice in a compact card with optional press handling, image size, and currency symbol.

Import

import { ProductCard } from '@tallyui/components';

Usage

<ProductCard doc={productDocument} onPress={() => addToCart(productDocument)} />

Combines ProductImage, ProductTitle, and ProductPrice into a single tappable card. When onPress is provided, the entire card becomes pressable.

Props

PropTypeDefaultDescription
docanyrequiredRxDB product document
onPress() => void—Tap handler (wraps card in Pressable)
imageSizenumber80Image width/height in pixels
currencySymbolstring—Currency symbol for price
notSoldLabelstring'Not sold here'Shown in place of the price when the channel doesn't sell this product.
classNamestring—Override card container styles

Default classes: items-center rounded-lg border border-border bg-card p-3

Composition

ProductCard renders these components internally:

  • ProductImage with size={imageSize} and rounded corners
  • ProductTitle truncated to 2 lines
  • ProductPrice with the provided currency symbol

Live demo