# cart (/themes/sdk/reference/cart)

```ts
import { … } from '@poltura/theme-sdk/cart';
```

## [Hooks](/themes/sdk/reference/cart/hooks) [#hooks]

| Name | What it is |
| --- | --- |
| [`useCart`](/themes/sdk/reference/cart/hooks#usecart) | The cart with its actions, usable anywhere on the storefront. |
| [`useCartPage`](/themes/sdk/reference/cart/hooks#usecartpage) | What the cart page shows beside the cart: recommendations, the minimum order and a changed bundle price. |

## [Parts](/themes/sdk/reference/cart/parts) [#parts]

| Name | What it is |
| --- | --- |
| [`CartLineItem`](/themes/sdk/reference/cart/parts#cartlineitem) | One cart line: image, title, variant, delivery note, personalisation, price, quantity and remove, with its bundle items under it. |
| [`CartLineQuantity`](/themes/sdk/reference/cart/parts#cartlinequantity) | The quantity stepper of a cart line, following the store's quantity steps; read-only while the cart is locked. |
| [`CartLineRemove`](/themes/sdk/reference/cart/parts#cartlineremove) | The button that removes a cart line; renders nothing while the cart is locked. |
| [`CartSummary`](/themes/sdk/reference/cart/parts#cartsummary) | The order summary: subtotal, shipping, tax, discounts, gift cards and the total, on the visitor's price basis. |
| [`CartCodeForm`](/themes/sdk/reference/cart/parts#cartcodeform) | The field that applies a gift card or discount code, with the entered codes under it. |
| [`CartCodes`](/themes/sdk/reference/cart/parts#cartcodes) | The discount codes the shopper entered, each with its status and a remove button. |
| [`CheckoutButton`](/themes/sdk/reference/cart/parts#checkoutbutton) | The button that goes to checkout; disabled while a change runs or the cart blocks checkout. |
| [`EmptyCart`](/themes/sdk/reference/cart/parts#emptycart) | What the cart shows when it holds nothing: an icon, a heading, a line and a button back to the shop. |
| [`CartRecommendations`](/themes/sdk/reference/cart/parts#cartrecommendations) | Products suggested to add to the cart, each with its own add button; renders nothing while the cart is locked. |
| [`MinimumOrderNotice`](/themes/sdk/reference/cart/parts#minimumordernotice) | How much is missing to the minimum order value, with a progress bar. |
| [`BundlePriceNotice`](/themes/sdk/reference/cart/parts#bundlepricenotice) | The notice that a bundle price changed, with the new total and the button that accepts it. |
| [`CartLockBanner`](/themes/sdk/reference/cart/parts#cartlockbanner) | The banner of a cart an app has locked, such as a quote: what holds it, a way back to an editable cart and a link to the app's page. |
| [`RemoveBundlesButton`](/themes/sdk/reference/cart/parts#removebundlesbutton) | A row with the button that removes every bundle from the cart, its items with it; a failure shows as a toast. |

## [Defaults](/themes/sdk/reference/cart/defaults) [#defaults]

| Name | What it is |
| --- | --- |
| [`CartButton`](/themes/sdk/reference/cart/defaults#cartbutton) | The header's cart button: the item count, and the mini cart it opens, a popover on large screens and a side sheet below. |
| [`MiniCart`](/themes/sdk/reference/cart/defaults#minicart) | The mini cart's body: compact lines, the total, the minimum order, and the cart and checkout buttons, or its empty and loading states. |

## [Constants](/themes/sdk/reference/cart/constants) [#constants]

| Name | What it is |
| --- | --- |
| [`cartRegions`](/themes/sdk/reference/cart/constants#cartregions) | The cart template's regions, where merchants place blocks. |

## [Types](/themes/sdk/reference/cart/types-1) [#types]

| Name | What it is |
| --- | --- |
| [`BundleMode`](/themes/sdk/reference/cart/types-1#bundlemode) | How a bundle in the cart was put together. |
| [`BundlePriceReview`](/themes/sdk/reference/cart/types-1#bundlepricereview) | A bundle price the shop changed since the shopper added the bundle, which they must accept before paying. |
| [`Cart`](/themes/sdk/reference/cart/types-1#cart) | The shopper's cart. |
| [`CartAddInput`](/themes/sdk/reference/cart/types-1#cartaddinput) | What to add to the cart. |
| [`CartCode`](/themes/sdk/reference/cart/types-1#cartcode) | A discount code the shopper entered. |
| [`CartCodeStatus`](/themes/sdk/reference/cart/types-1#cartcodestatus) | Whether an entered code takes effect: now, once a checkout fact is known, or not at all. |
| [`CartError`](/themes/sdk/reference/cart/types-1#carterror) | A failed cart action, with a message ready to show. |
| [`CartErrorCode`](/themes/sdk/reference/cart/types-1#carterrorcode) | Why a cart action failed. |
| [`CartGiftCard`](/themes/sdk/reference/cart/types-1#cartgiftcard) | A gift card applied to the cart. |
| [`CartLine`](/themes/sdk/reference/cart/types-1#cartline) | One line of the cart, with the bundle components folded under it. |
| [`CartLineBundle`](/themes/sdk/reference/cart/types-1#cartlinebundle) | The bundle a cart line belongs to. |
| [`CartLineGiftCardDelivery`](/themes/sdk/reference/cart/types-1#cartlinegiftcarddelivery) | Who a gift card in the cart goes to and when it is sent. |
| [`CartLinePersonalization`](/themes/sdk/reference/cart/types-1#cartlinepersonalization) | A text the shopper entered to personalise a cart line, with the field's label. |
| [`CartLinePreorder`](/themes/sdk/reference/cart/types-1#cartlinepreorder) | The delivery date a shopper agrees to by ordering a pre-order line. |
| [`CartLineState`](/themes/sdk/reference/cart/types-1#cartlinestate) | Whether a cart line is being changed and what went wrong with the last change. |
| [`CartNetTotals`](/themes/sdk/reference/cart/types-2#cartnettotals) | The cart totals without tax. |
| [`CartPageView`](/themes/sdk/reference/cart/types-2#cartpageview) | What the cart page shows beside the cart itself. |
| [`CartResult`](/themes/sdk/reference/cart/types-2#cartresult) | The outcome of a cart action. |
| [`CartState`](/themes/sdk/reference/cart/types-2#cartstate) | The cart with the actions that change it; the host runs every mutation. |
| [`CartTotals`](/themes/sdk/reference/cart/types-2#carttotals) | What the cart adds up to. |
| [`MiniCartState`](/themes/sdk/reference/cart/types-2#minicartstate) | The mini cart's open state. |
| [`MinimumOrder`](/themes/sdk/reference/cart/types-2#minimumorder) | The minimum order value the cart does not reach yet. |
| [`CartButtonClassKey`](/themes/sdk/reference/cart/types-2#cartbuttonclasskey) | The parts of [`CartButton`](/themes/sdk/reference/cart/defaults#cartbutton) that take their own classes. |
| [`CartButtonProps`](/themes/sdk/reference/cart/types-2#cartbuttonprops) | Props of [`CartButton`](/themes/sdk/reference/cart/defaults#cartbutton). |
| [`MiniCartProps`](/themes/sdk/reference/cart/types-2#minicartprops) | Props of [`MiniCart`](/themes/sdk/reference/cart/defaults#minicart). |
| [`CartLineItemProps`](/themes/sdk/reference/cart/types-2#cartlineitemprops) | Props of [`CartLineItem`](/themes/sdk/reference/cart/parts#cartlineitem). |
| [`CartLineQuantityProps`](/themes/sdk/reference/cart/types-2#cartlinequantityprops) | Props of [`CartLineQuantity`](/themes/sdk/reference/cart/parts#cartlinequantity). |
| [`CartLineRemoveProps`](/themes/sdk/reference/cart/types-2#cartlineremoveprops) | Props of [`CartLineRemove`](/themes/sdk/reference/cart/parts#cartlineremove). |
| [`CartSummaryProps`](/themes/sdk/reference/cart/types-2#cartsummaryprops) | Props of [`CartSummary`](/themes/sdk/reference/cart/parts#cartsummary). |
| [`CartCodeFormProps`](/themes/sdk/reference/cart/types-2#cartcodeformprops) | Props of [`CartCodeForm`](/themes/sdk/reference/cart/parts#cartcodeform). |
| [`CartCodesProps`](/themes/sdk/reference/cart/types-2#cartcodesprops) | Props of [`CartCodes`](/themes/sdk/reference/cart/parts#cartcodes). |
| [`CheckoutButtonProps`](/themes/sdk/reference/cart/types-2#checkoutbuttonprops) | Props of [`CheckoutButton`](/themes/sdk/reference/cart/parts#checkoutbutton). |
| [`EmptyCartProps`](/themes/sdk/reference/cart/types-2#emptycartprops) | Props of [`EmptyCart`](/themes/sdk/reference/cart/parts#emptycart). |
| [`CartRecommendationsProps`](/themes/sdk/reference/cart/types-2#cartrecommendationsprops) | Props of [`CartRecommendations`](/themes/sdk/reference/cart/parts#cartrecommendations). |
| [`MinimumOrderNoticeProps`](/themes/sdk/reference/cart/types-2#minimumordernoticeprops) | Props of [`MinimumOrderNotice`](/themes/sdk/reference/cart/parts#minimumordernotice). |
| [`BundlePriceNoticeProps`](/themes/sdk/reference/cart/types-2#bundlepricenoticeprops) | Props of [`BundlePriceNotice`](/themes/sdk/reference/cart/parts#bundlepricenotice). |
| [`CartLockBannerProps`](/themes/sdk/reference/cart/types-2#cartlockbannerprops) | Props of [`CartLockBanner`](/themes/sdk/reference/cart/parts#cartlockbanner). |
| [`RemoveBundlesButtonProps`](/themes/sdk/reference/cart/types-2#removebundlesbuttonprops) | Props of [`RemoveBundlesButton`](/themes/sdk/reference/cart/parts#removebundlesbutton). |

<AnchorRedirect to={{"hooks":"/themes/sdk/reference/cart/hooks","usecart":"/themes/sdk/reference/cart/hooks","usecartpage":"/themes/sdk/reference/cart/hooks","parts":"/themes/sdk/reference/cart/parts","cartlineitem":"/themes/sdk/reference/cart/parts","cartlinequantity":"/themes/sdk/reference/cart/parts","cartlineremove":"/themes/sdk/reference/cart/parts","cartsummary":"/themes/sdk/reference/cart/parts","cartcodeform":"/themes/sdk/reference/cart/parts","cartcodes":"/themes/sdk/reference/cart/parts","checkoutbutton":"/themes/sdk/reference/cart/parts","emptycart":"/themes/sdk/reference/cart/parts","cartrecommendations":"/themes/sdk/reference/cart/parts","minimumordernotice":"/themes/sdk/reference/cart/parts","bundlepricenotice":"/themes/sdk/reference/cart/parts","cartlockbanner":"/themes/sdk/reference/cart/parts","removebundlesbutton":"/themes/sdk/reference/cart/parts","defaults":"/themes/sdk/reference/cart/defaults","cartbutton":"/themes/sdk/reference/cart/defaults","minicart":"/themes/sdk/reference/cart/defaults","constants":"/themes/sdk/reference/cart/constants","cartregions":"/themes/sdk/reference/cart/constants","types":"/themes/sdk/reference/cart/types-1","bundlemode":"/themes/sdk/reference/cart/types-1","bundlepricereview":"/themes/sdk/reference/cart/types-1","cart":"/themes/sdk/reference/cart/types-1","cartaddinput":"/themes/sdk/reference/cart/types-1","cartcode":"/themes/sdk/reference/cart/types-1","cartcodestatus":"/themes/sdk/reference/cart/types-1","carterror":"/themes/sdk/reference/cart/types-1","carterrorcode":"/themes/sdk/reference/cart/types-1","cartgiftcard":"/themes/sdk/reference/cart/types-1","cartline":"/themes/sdk/reference/cart/types-1","cartlinebundle":"/themes/sdk/reference/cart/types-1","cartlinegiftcarddelivery":"/themes/sdk/reference/cart/types-1","cartlinepersonalization":"/themes/sdk/reference/cart/types-1","cartlinepreorder":"/themes/sdk/reference/cart/types-1","cartlinestate":"/themes/sdk/reference/cart/types-1","cartnettotals":"/themes/sdk/reference/cart/types-2","cartpageview":"/themes/sdk/reference/cart/types-2","cartresult":"/themes/sdk/reference/cart/types-2","cartstate":"/themes/sdk/reference/cart/types-2","carttotals":"/themes/sdk/reference/cart/types-2","minicartstate":"/themes/sdk/reference/cart/types-2","minimumorder":"/themes/sdk/reference/cart/types-2","cartbuttonclasskey":"/themes/sdk/reference/cart/types-2","cartbuttonprops":"/themes/sdk/reference/cart/types-2","minicartprops":"/themes/sdk/reference/cart/types-2","cartlineitemprops":"/themes/sdk/reference/cart/types-2","cartlinequantityprops":"/themes/sdk/reference/cart/types-2","cartlineremoveprops":"/themes/sdk/reference/cart/types-2","cartsummaryprops":"/themes/sdk/reference/cart/types-2","cartcodeformprops":"/themes/sdk/reference/cart/types-2","cartcodesprops":"/themes/sdk/reference/cart/types-2","checkoutbuttonprops":"/themes/sdk/reference/cart/types-2","emptycartprops":"/themes/sdk/reference/cart/types-2","cartrecommendationsprops":"/themes/sdk/reference/cart/types-2","minimumordernoticeprops":"/themes/sdk/reference/cart/types-2","bundlepricenoticeprops":"/themes/sdk/reference/cart/types-2","cartlockbannerprops":"/themes/sdk/reference/cart/types-2","removebundlesbuttonprops":"/themes/sdk/reference/cart/types-2"}} />
