Skip to content
GetUrUI

Product cards

5 variantsNewPro
.md

Five storefront pieces — swatch card, quick-add card, bag row, bundle deal and compact ranked list — with recolouring products, rolling quantities and rows that glide to a new sort.

productecommerceshopstorecartbagswatchesquick addbundlecountdown

Classic

classic.tsx

Product card whose drawn item recolours as you pick a swatch, with a popping wishlist heart and Add to bag that confirms.

$npx shadcn@latest add @geturui-pro/product-cards-classic
PropTypeDefaultDescription
name / description / pricestring—Product content.
compareAt / saveLabelstring—Struck-through price and the money tag.
rating / reviewsnumber—Average rating and review count.
colors / defaultColorProductColor[] / string—{ name, hex } swatches and the initial one.
defaultWishlisted / onWishlistChangeboolean / (w: boolean) => void—Wishlist state.
onAddToBag(color: ProductColor) => void—Called by Add to bag.
classNamestring—Extra classes on the root element.

Quick add

quick-add.tsx

Card whose size picker slides up over the image on hover, focus or tap, adds in one click and confirms in place.

$npx shadcn@latest add @geturui-pro/product-cards-quick-add
PropTypeDefaultDescription
name / detail / pricestring—Product content.
tonestring"#8a7f6c"Hex used to draw the garment.
sizesSizeOption[]—{ label, inStock? } per size; sold-out sizes are disabled.
defaultOpenbooleanfalseStart with the size panel open.
onAdd(size: string) => void—Called with the chosen size.
classNamestring—Extra classes on the root element.

Bag row

list-row.tsx

Bag row with a quantity stepper whose number rolls, a following line total, a low-stock warning and remove with undo.

$npx shadcn@latest add @geturui-pro/product-cards-list-row
PropTypeDefaultDescription
name / variantstring—Item name and variant line.
unitPrice / currencynumber / string—Price per unit and ISO currency.
defaultQuantity / stocknumber—Initial quantity and the stepper cap.
tone / shapestring / "vessel" | "box"—Thumbnail colour and drawing.
onQuantityChange / onRemove / onUndo(q: number) => void / () => void—Row handlers.
classNamestring—Extra classes on the root element.

Bundle deal

bundle-deal.tsx

Bundle card where toggling items recounts the price and savings under a live countdown with rolling digits.

$npx shadcn@latest add @geturui-pro/product-cards-bundle-deal
PropTypeDefaultDescription
titlestring"Weekend brew bundle"Card heading.
itemsBundleItem[]—{ id, name, price, art } per item.
tiersRecord<number, number>{ 2: 10, 3: 20 }Discount percent by number of items picked.
endsInnumber—Seconds until the deal ends.
currencystring"USD"ISO currency for formatting.
onAdd(ids: string[], total: number) => void—Called by the add button.
classNamestring—Extra classes on the root element.

Compact list

compact-list.tsx

Ranked list of four products whose rows glide to their new order when the sort changes, each with an add toggle.

$npx shadcn@latest add @geturui-pro/product-cards-compact-list
PropTypeDefaultDescription
headingstring"Trending this week"List title.
productsCompactProduct[]—{ id, name, maker, price, rating, sold, tone } per row.
defaultSort"popular" | "price" | "rating""popular"Initial order.
currencystring"USD"ISO currency for formatting.
onAdd(product: CompactProduct, added: boolean) => void—Called when a row is added or removed.
classNamestring—Extra classes on the root element.

Install the whole set

Installs every product cards variant at once. Each section above has its own command for a single variant.

Pro installs use your private registry token. Add the @geturui-pro registry once — setup guide. The command works after you get Pro.

$npx shadcn@latest add @geturui-pro/product-cards

Accessibility

  • Swatches and sorts are labelled radio and pressed-button groups with arrow keys and visible focus.
  • Quantity, add and remove actions are real buttons with item names in their labels; stock and savings are stated in words.
  • Recolours, rolling numbers and reorders run without spatial motion when reduced motion is on.

Related