--- title: "Cart" slug: cart category: component type: technical-information version: 20.0.0 tokens: 841 source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-cart--technical-information.txt --- # Cart ## Cart | Property | Type | Required | Default | Description | |---|---|---|---|---| | `i18n` | `Partial` | No | undefined | Internal translations override. | | `locale` | `'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' | 'pt'` | No | undefined | The locale used for the translation of the internal elements. | | `onOpenChange` | `(detail: CartOpenChangeDetail) => void` | No | undefined | Callback fired when the cart open state changes (on Mobile only). | ## CartAction _No specific property._ ## CartEmpty This component extends all the native `
` attributes. _No specific property._ ## CartExtraContent This component extends all the native `
` attributes. _No specific property._ ## CartProductGroup | Property | Type | Required | Default | Description | |---|---|---|---|---| | `details` | `ReactNode` | No | undefined | Product details node to display. | | `disabled` | `boolean` | No | undefined | Whether the component is disabled. | | `label` | `ReactNode` | Yes | undefined | Product label node to display. | | `multiple` | `boolean` | No | undefined | Whether multiple accordion items can be expanded at the same time. | | `onChange` | `(detail: AccordionChangeDetail) => void` | No | undefined | Callback fired when the state of expanded/collapsed accordion items changes. | | `onRemove` | `() => void` | No | undefined | Callback fired when the remove button is pressed. | | `open` | `boolean` | No | undefined | The controlled open state of the product group. | | `price` | `ReactNode` | Yes | undefined | Formatted price node to display. | | `value` | `string[]` | No | undefined | The controlled value of the expanded accordion items. | ## CartProductGroupItem This component extends all the native `
` attributes. | Property | Type | Required | Default | Description | |---|---|---|---|---| | `details` | `ReactNode` | No | undefined | Product details node to display. | | `label` | `ReactNode` | Yes | undefined | Product label node to display. | | `onRemove` | `() => void` | No | undefined | Callback fired when the remove button is pressed. | | `price` | `ReactNode` | Yes | undefined | Formatted price node to display. | | `quantity` | `number` | No | undefined | Number of selected product. | ## CartTotal This component extends all the native `
` attributes. | Property | Type | Required | Default | Description | |---|---|---|---|---| | `label` | `ReactNode` | Yes | undefined | Total label node to display. | | `price` | `ReactNode` | Yes | undefined | Formatted price node to display. | | `priceDetails` | `ReactNode` | No | undefined | Price details node to display. | | `totalDetails` | `ReactNode` | No | undefined | Total details node to display. | ## Enums ### CART_I18N - `expandButton` = `cart.expand` - `reduceButton` = `cart.reduce` - `removeProductButton` = `cart.product.remove.button` ## CSS Variables | Variable | Default value | |---|---| | `--ods-cart-product-group-item-padding-horizontal` | `var(--ods-semantic-size-space-inset-inline)` | | `--ods-cart-product-group-item-padding-vertical` | `var(--ods-semantic-size-space-inset-block)` | | `--ods-cart-handle-height` | `4px` | | `--ods-cart-padding-horizontal` | `calc(var(--ods-semantic-size-space-inset-inline) * 2)` | | `--ods-cart-padding-vertical` | `calc(var(--ods-semantic-size-space-inset-block) * 2)` |