Product components
Components for displaying products, prices, variants, and add-to-cart functionality.
Product card
Display a product with its image, title, and price. Use in grids and listings.
Properties
Property | Type | Description |
|---|---|---|
Product | CMS binding | Connect to TGC Products collection |
Show hover image | Boolean | Swap to second image on hover |
Show sale badge | Boolean | Display "Sale" badge when product is on sale |
Link to | Page | Product detail page to navigate to on click |
How it works
Canvas: Displays data from the Framer CMS snapshot — title, main image, and price.
Live site: Fetches fresh data from Swell using the product's swellId. Price and sale status reflect current Swell values.
Basic usage
Drag the Product card onto your canvas
In the right panel, bind it to TGC Products
Choose a specific product or use in a CMS collection list for dynamic grids
Set the Link to property to your product detail page
Hover image
Enable Show hover image to swap images on hover. TGC automatically uses the second image from your Swell product gallery.
If a product only has one image, the hover state shows the same image (no flash or broken state).
Sale badge
Enable Show sale badge to display a badge when isOnSale is true.
The badge appears when a product has a sale price set in Swell. Style the badge using Framer's design tools.
Styling
Element | What to style |
|---|---|
Container | Background, border, padding, shadow |
Image | Aspect ratio, border radius, object fit |
Title | Font, size, colour, weight |
Price | Font, size, colour |
Sale price | Font, size, colour (typically red or muted) |
Original price | Strikethrough style when on sale |
Badge | Background, text, position |
Product detail
Full product display with image gallery, description, variants, and add to cart. Use on your product detail page (PDP).
Properties
Property | Type | Description |
|---|---|---|
Product | CMS binding | Connect to TGC Products collection |
Gallery style | Enum | "Grid", "Carousel", or "Thumbnails" |
Show description | Boolean | Display product description |
How it works
Canvas: Displays the CMS snapshot — title, images, description, price, and variant labels for layout purposes.
Live site: Fetches full product data from Swell including real-time pricing, variant combinations, and stock availability.
Basic usage
Create a CMS page in Framer connected to TGC Products
Drag the Product detail component onto that page
It automatically binds to the current product from the URL
Add a Variant selector and Purchase button inside or alongside the component
Gallery styles
Style | Behaviour |
|---|---|
Grid | All images displayed in a grid layout |
Carousel | Swipeable/scrollable image carousel |
Thumbnails | Large main image with clickable thumbnails below |
Images are pulled from your Swell product gallery in the order they appear there.
Composing a PDP
The Product detail component works best when combined with:
Component | Purpose |
|---|---|
Variant selector | Let customers choose size, colour, etc. |
Product price | Display price with sale support |
Purchase button | Add selected variant to cart |
Related products | Show similar products |
These components communicate through the TGC runtime — selecting a variant updates the price and purchase button automatically.
Styling
Element | What to style |
|---|---|
Container | Layout, padding, max-width |
Gallery | Grid columns, gap, aspect ratios |
Title | Font, size, colour |
Description | Font, size, line height |
Price area | Layout, spacing |
Product price
Display the product price with support for sale prices and currency formatting.
Properties
Property | Type | Description |
|---|---|---|
Product | CMS binding | Connect to TGC Products collection |
Show original price | Boolean | Strike through original when on sale |
Currency symbol | String | e.g., "$", "£", "€" |
Currency position | Enum | "Before" or "After" the amount |
How it works
Canvas: Shows the price snapshot from Framer CMS. May not reflect current Swell pricing.
Live site: Fetches the current price from Swell. If a variant is selected, shows that variant's price.
Basic usage
Drag Product price onto your canvas
Bind it to TGC Products
Configure your currency symbol
Enable Show original price if you want strikethrough pricing for sales
Sale price display
When a product is on sale and Show original price is enabled:
Style the original and sale prices differently to make the discount clear.
Variant pricing
When used alongside a Variant selector, the price automatically updates when the customer selects a different variant.
This happens through the TGC runtime — no additional setup required.
Styling
Element | What to style |
|---|---|
Current price | Font, size, colour, weight |
Original price | Strikethrough, muted colour |
Currency symbol | Can match price or be styled separately |
Container | Spacing, alignment |
Variant selector
Let customers choose product options like size, colour, or material.
Properties
Property | Type | Description |
|---|---|---|
Product | CMS binding | Connect to TGC Products collection |
Style | Enum | "Pills" or "Dropdown" |
Show labels | Boolean | Display option name (e.g., "Size", "Colour") |
Show availability | Boolean | Indicate which options are in stock |
How it works
Canvas: Shows variant labels from the CMS snapshot (designVariants field) for layout purposes.
Live site: Fetches real variant options from Swell with availability status. Handles multi-dimensional variants (e.g., Size + Colour combinations).
Basic usage
On your product detail page, drag Variant selector into your layout
It automatically inherits the product from the page's CMS binding
Choose your preferred Style (Pills or Dropdown)
Enable Show availability to indicate stock status
Styles
Style | Best for |
|---|---|
Pills | Few options (sizes, colours) — visual and quick to select |
Dropdown | Many options — saves space, good for long lists |
Multi-dimensional variants
If your product has multiple option types (e.g., Size and Colour), the Variant selector handles them automatically:
Each option type gets its own selector
Selecting one option filters available combinations
Unavailable combinations are visually indicated
Communication with other components
When a customer selects a variant, the TGC runtime notifies other components:
Component | What updates |
|---|---|
Product price | Shows selected variant's price |
Purchase button | Adds correct variant to cart |
Product images | Can swap to variant-specific image (if configured in Swell) |
No additional setup required — just place the components on the same page.
Styling
Element | What to style |
|---|---|
Label | Font, size, colour |
Pills | Background, border, padding, selected state |
Dropdown | Border, background, font |
Unavailable state | Opacity, strikethrough, disabled colour |
Selected state | Background, border, colour |
Purchase button
Add to cart button with loading, sold out, and variant selection states.
Properties
Property | Type | Description |
|---|---|---|
Product | CMS binding | Connect to TGC Products collection |
Label | String | Button text (default: "Add to cart") |
Loading label | String | Text while adding (default: "Adding...") |
Sold out label | String | Text when unavailable (default: "Sold out") |
Select variant label | String | Text when variant required (default: "Select options") |
How it works
Canvas: Shows the default label for layout purposes.
Live site: Connects to the TGC runtime. Responds to variant selection, checks stock availability, and adds items to the cart.
Button states
State | When | Behaviour |
|---|---|---|
Default | Ready to purchase | Clickable, shows main label |
Select variant | Product has variants, none selected | Shows prompt, may be disabled |
Loading | Adding to cart | Shows loading label, disabled |
Sold out | Variant out of stock | Shows sold out label, disabled |
Basic usage
On your product detail page, drag Purchase button into your layout
It automatically inherits the product from the page's CMS binding
If using with Variant selector, the button waits for a selection before enabling
Quick add (without variant selection)
For products without variants, or to add a default variant directly from a grid:
Place Purchase button inside or alongside a Product card
The button adds the product's default variant to cart
No variant selector needed
What happens on click
Button shows loading state
TGC adds the item to the cart (stored in
localStorage)Cart state updates across all components
Cart button count increments
Button returns to default state
Styling
Element | What to style |
|---|---|
Button | Background, border, padding, font |
Hover state | Background, border colour |
Loading state | Opacity, cursor |
Disabled state | Background, opacity, cursor |
Sold out state | Background, text colour |