CartForm
Creates a form for managing cart operations. Use CartActionInput to accept form inputs of known type.
Anchor to propsProps
Anchor to CartActionInputProps
CartActionInputProps
CartAttributesUpdateProps | CartBuyerIdentityUpdateProps | CartCreateProps | CartDiscountCodesUpdateProps | CartGiftCardCodesUpdateProps | CartGiftCardCodesAddProps | CartGiftCardCodesRemoveProps | CartLinesAddProps | CartLinesUpdateProps | CartLinesRemoveProps | CartNoteUpdateProps | CartSelectedDeliveryOptionsUpdateProps | CartMetafieldsSetProps | CartMetafieldDeleteProps | CartDeliveryAddressesAddProps | CartDeliveryAddressesRemoveProps | CartDeliveryAddressesUpdateProps | CartDeliveryAddressesReplaceProps | CartCustomPropsCartAttributesUpdateProps | CartBuyerIdentityUpdateProps | CartCreateProps | CartDiscountCodesUpdateProps | CartGiftCardCodesUpdateProps | CartGiftCardCodesAddProps | CartGiftCardCodesRemoveProps | CartLinesAddProps | CartLinesUpdateProps | CartLinesRemoveProps | CartNoteUpdateProps | CartSelectedDeliveryOptionsUpdateProps | CartMetafieldsSetProps | CartMetafieldDeleteProps | CartDeliveryAddressesAddProps | CartDeliveryAddressesRemoveProps | CartDeliveryAddressesUpdateProps | CartDeliveryAddressesReplaceProps | CartCustomProps
Anchor to CartFormCommonProps
CartFormCommonProps
- Anchor to childrenchildrenchildrenReactNode | ((fetcher: FetcherWithComponents<any>) => ReactNode)ReactNode | ((fetcher: FetcherWithComponents<any>) => ReactNode)requiredrequired
Children nodes of CartForm. Children can be a render prop that receives the fetcher.
- Anchor to fetcherKeyfetcherKeyfetcherKeystringstring
Optional key to use for the fetcher.
- Anchor to routerouteroutestringstring
The route to submit the form to. Defaults to the current route.
CartActionInputProps
CartAttributesUpdateProps | CartBuyerIdentityUpdateProps | CartCreateProps | CartDiscountCodesUpdateProps | CartGiftCardCodesUpdateProps | CartGiftCardCodesAddProps | CartGiftCardCodesRemoveProps | CartLinesAddProps | CartLinesUpdateProps | CartLinesRemoveProps | CartNoteUpdateProps | CartSelectedDeliveryOptionsUpdateProps | CartMetafieldsSetProps | CartMetafieldDeleteProps | CartDeliveryAddressesAddProps | CartDeliveryAddressesRemoveProps | CartDeliveryAddressesUpdateProps | CartDeliveryAddressesReplaceProps | CartCustomPropsCartAttributesUpdateProps
- action
'AttributesUpdateInput' - inputs
{ attributes: AttributeInput[]; } & OtherFormData
AttributeInput
OtherFormData
CartBuyerIdentityUpdateProps
- action
'BuyerIdentityUpdate' - inputs
{ buyerIdentity: CartBuyerIdentityInput; } & OtherFormData
CartBuyerIdentityInput
CartCreateProps
- action
'Create' - inputs
{ input: CartInput; } & OtherFormData
CartInput
CartDiscountCodesUpdateProps
- action
'DiscountCodesUpdate' - inputs
{ discountCodes: string[]; } & OtherFormData
CartGiftCardCodesUpdateProps
- action
'GiftCardCodesUpdate' - inputs
{ giftCardCodes: string[]; } & OtherFormData
CartGiftCardCodesAddProps
- action
'GiftCardCodesAdd' - inputs
{ giftCardCodes: string[]; } & OtherFormData
CartGiftCardCodesRemoveProps
- action
'GiftCardCodesRemove' - inputs
{ giftCardCodes: string[]; } & OtherFormData
CartLinesAddProps
- action
'LinesAdd' - inputs
{ lines: OptimisticCartLineInput[]; } & OtherFormData
OptimisticCartLineInput
CartLineInput & {
selectedVariant?: unknown;
}CartLineInput
CartLinesUpdateProps
- action
'LinesUpdate' - inputs
{ lines: CartLineUpdateInput[]; } & OtherFormData
CartLineUpdateInput
CartLinesRemoveProps
- action
'LinesRemove' - inputs
{ lineIds: string[]; } & OtherFormData
CartNoteUpdateProps
- action
'NoteUpdate' - inputs
{ note: string; } & OtherFormData
CartSelectedDeliveryOptionsUpdateProps
- action
'SelectedDeliveryOptionsUpdate' - inputs
{ selectedDeliveryOptions: CartSelectedDeliveryOptionInput[]; } & OtherFormData
CartSelectedDeliveryOptionInput
CartMetafieldsSetProps
- action
'MetafieldsSet' - inputs
{ metafields: MetafieldWithoutOwnerId[]; } & OtherFormData
MetafieldWithoutOwnerId
CartMetafieldDeleteProps
- action
'MetafieldsDelete' - inputs
{ key: string; } & OtherFormData
CartDeliveryAddressesAddProps
- action
'DeliveryAddressesAdd' - inputs
{ addresses: CartSelectableAddressInput[]; } & OtherFormData
CartDeliveryAddressesRemoveProps
- action
'DeliveryAddressesRemove' - inputs
{ addressIds: string[]; } & OtherFormData
CartDeliveryAddressesUpdateProps
- action
'DeliveryAddressesUpdate' - inputs
{ addresses: CartSelectableAddressUpdateInput[]; } & OtherFormData
CartDeliveryAddressesReplaceProps
- action
'DeliveryAddressesReplace' - inputs
{ addresses: CartSelectableAddressInput[]; } & OtherFormData
CartCustomProps
- action
`Custom${string}` - inputs
Construct a type with a set of properties K of type T
Record<string, unknown>
CartFormCommonProps
- children
Children nodes of CartForm. Children can be a render prop that receives the fetcher.
ReactNode | ((fetcher: FetcherWithComponents<any>) => ReactNode) - fetcherKey
Optional key to use for the fetcher.
string - route
The route to submit the form to. Defaults to the current route.
string
Was this page helpful?