Skip to main content
Cart Items preview A fully interactive cart item list component for Framer that reads from localStorage, renders each item with its image, title, variant options, price, and quantity controls, and supports increasing, decreasing, and removing items in real time.

What It Does

The Cart Product List renders all items currently in the cart as individual cards. Each card shows the product image, title, selected variant options, price, a quantity stepper (+/−), and a trash icon to remove the item. All interactions write directly back to localStorage and dispatch a cartUpdated event to keep other cart components in sync. Key behaviors at a glance:
  • **Reads cart from **localStorage — on mount, reads the cart key and renders one card per item.
  • Increase / decrease quantity — the + and buttons update the item’s quantity. The minimum quantity is 1; the button does not go below it.
  • Remove item — the trash icon removes the item from the cart entirely.
  • **Writes back to **localStorage — every quantity or delete action saves the updated cart back to localStorage and dispatches a cartUpdated event so the Cart Item Counter, Cart State Controller, and any other cart components update instantly.
  • Preview-safe dummy data — when the cart is empty (e.g. on the Framer canvas), the component renders five sample items so the layout is always visible while designing.
  • Updates in real time — listens for cartUpdated events from other components so the list stays in sync if the cart is modified elsewhere on the page.

Property Controls

All controls are accessible in Framer’s right panel when the component is selected. They are grouped into four sections: Outer Container, Card, Image, and Content.

Outer Container

PropertyTypeDescription
Gap between cardsNumber (px)Vertical spacing between individual cart item cards.

Card

Controls the appearance of each cart item card.
PropertyTypeDefaultDescription
PaddingPaddingInner spacing inside each card.
BorderBorder1px solid rgba(0,0,0,0.5)Border style of each card.
Border RadiusBorderRadiusCorner rounding of each card.
ShadowBoxShadow0px 1px 2px 0px rgba(0,0,0,0.25)Shadow applied to each card.
BackgroundColor#fffBackground color of each card.
GapNumber (px)Horizontal spacing between the product image and the content area.

Image

Controls the product image on the left side of each card.
PropertyTypeDefaultDescription
WidthNumber (px)180Width of the product image.
HeightNumber (px)180Height of the product image.
Border RadiusBorderRadiusCorner rounding of the product image.
TypeEnumContainHow the image fills its box. Options: Contain, Cover, Fill.

Content

Controls all text, layout, and interactive elements in the right-hand content area of each card.

Quantity

Controls the quantity stepper (− / value / +). Container — the pill or box wrapping all three elements:
PropertyTypeDefaultDescription
GapNumber (px)4Spacing between the buttons and the quantity value.
BackgroundColor#000Background color of the quantity container.
PaddingPaddingInner spacing of the quantity container.
BorderBorder1px solid rgba(0,0,0,0.5)Border of the quantity container.
Border RadiusBorderRadiusCorner rounding of the quantity container.
ShadowBoxShadow0px 1px 2px 0px rgba(0,0,0,0.25)Shadow on the quantity container.
Buttons — the individual + and buttons:
PropertyTypeDefaultDescription
PaddingPaddingInner spacing of each button.
BorderBorder1px solid rgba(0,0,0,0.5)Border of each button.
Border RadiusBorderRadiusCorner rounding of each button.
BackgroundColor#fffBackground color of each button.
Icon ColorColor#000Color of the plus and minus icons.
Icon SizeNumber (px)16Size of the plus and minus icons.
Text — the quantity value displayed between the buttons:
PropertyTypeDefaultDescription
FontFontTypography for the quantity number.
ColorColor#fffText color of the quantity number.

Trash Icon

Controls the remove item button.
PropertyTypeDefaultDescription
BackgroundColor#000Background color of the trash icon container.
ColorColor#fffColor of the trash icon.
SizeNumber (px)16Size of the trash icon.
PaddingPaddingInner spacing around the trash icon.
Border RadiusBorderRadiusCorner rounding of the trash icon container.

Title

PropertyTypeDefaultDescription
FontFontTypography for the product title.
ColorColor#000Text color of the product title.

Price

PropertyTypeDefaultDescription
FontFontTypography for the product price.
ColorColor#000Text color of the product price.
AlignmentEnumCenterVertical alignment of the price relative to the title. Options: Center, Flex Start, Flex End.

Variant

Controls the variant option labels (e.g. Color: Black) shown under the product title. Key — the option name (e.g. Color, Size):
PropertyTypeDefaultDescription
FontFontTypography for variant key labels.
ColorColor#000Text color of variant key labels.
Value — the option value (e.g. Black, Large):
PropertyTypeDefaultDescription
FontFontTypography for variant values.
ColorColor#000Text color of variant values.

Spacing

PropertyTypeDescription
PaddingPaddingInner spacing of the entire content area.
GapGapSpacing between title, variant labels, and price.
Main GapGapSpacing between the upper content block (title, variants, price) and the lower controls (quantity stepper and trash icon).

Notes

  • Each cart item in localStorage must include variantId, title, price.amount, quantity, selectedOptions, and optionally image. If image is missing, a placeholder image is shown.
  • Every interaction (increase, decrease, delete) dispatches a cartUpdated event on window after saving to localStorage, keeping the Cart Item Counter and Cart State Controller in sync automatically.
  • The minimum quantity per item is 1. Clicking on a quantity of 1 does nothing.
  • When the cart is empty, five dummy preview items are rendered so the layout remains visible in Framer’s canvas while designing.