Fluent Commerce Logo
Docs

Product Card Component

UI ComponentUI Component overview

Changed on:

19 July 2024

Overview

The Product Card Component is a consistent way to represent product information across the applications. Alongside the typical card features it can also display an image, attributes, a count, and a close icon, while also allowing nested components for added functionality.
No alt text provided
Plugin NameCore
The standard library of mystique components. 

Alias

fc.card.product

Detailed technical description

Various child components can be placed inside the card to extend basic functionality. If composing the component with others is necessary, using the card without an indent will avoid extra spacing.Example:No alt provided

Properties

NameTypeRequiredDefaultDescription
 title `string` no noneThe Title text of the card
attributes`TextDynamicAttribute[]`no[]List of key/value pairs to show on the card
count`number`nononeNumber that is displayed in the to right corner of the card.
cardImage`CardImageProps`nononeAn object containing image URL and dimensions (width and height)
width`CardWidth ("quarter"/ "third"/ "half"/ "two-thirds"/ "full"/ number (1-12))`no12Define the width of this card on a 12-column grid. Can use the named widths for readability or numbers directly.On mobile devices, all widths will automatically change to 12 for the best responsive experience.
indent`boolean`notrueCard padding switcher.
CardImageProperties
NameTypeRequiredDefaultDescription
height`string`no-Image height
width`string`mo-Image width
imageUrl`string`no-Image URL

Configuration example

1{
2  "component": "fc.card.product",
3  "props": {
4    "title": "Nike Air 270",
5    "cardImage": {
6      "imageUrl": "https://c.static-nike.com/a/images/f_auto,b_rgb:f5f5f5,w_440/skwgyqrbfzhu6uyeh0gg/air-max-270-shoe-nnTrqDGR.jpg",
7      "width": "100px",
8      "height": "100px"
9    },
10    "width": 4,
11    "attributes": [
12      { "value": "AH8050-001"},
13      { "value": "5901234123457"}
14    ],
15    "count": 5
16  }
17}

Version History

Recommended Placement

The component can be placed in pages, drawers, lists.