Cart Line Item
DisplayCart row with thumbnail, title, variant, price, quantity stepper, and remove action.
Cart Line ItemDisplay · Web
Loading Storybook preview…
Installation
bun add @otfdashkit/ui
Usage
Import CartLineItem from @otfdashkit/ui.
Code
// Cart Line Item — Cart row with thumbnail, title, variant, price, quantity stepper, and remove action.
//
// Install:
// bun add @otfdashkit/ui
import { CartLineItem } from '@otfdashkit/ui'
export function Example() {
return (
<CartLineItem>
{/* your content */}
</CartLineItem>
)
}Props
Props declared in the CartLineItem source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| pricerequired | number | Unit price in minor units (cents). | |
| quantityrequired | number | ||
| titlerequired | string | ||
| compareAt | number | Optional compare-at unit price in minor units. | |
| currency | string | 'USD' | |
| image | string | Product thumbnail URL. | |
| maxQuantity | number | 99 | |
| minQuantity | number | 1 | |
| onQuantityChange | (qty: number) => void | ||
| onRemove | () => void | ||
| variant | string | Variant summary line, e.g. "Whole bean · 250g". |