v14.0.2


layouts

Product Card

A features rich card for products

Features

  • Product Image Gallery
  • Overlay Actions
  • Header Menu Actions
  • Clickable

Overview

ProductCard is a variant of the Card component that displays product information. There are four core sections — Media, Header, Kpis and Footer. Each of these sections can hold the pre-styled subcomponents (images, title, subtitle and actions) or other content including text, buttons and links.

    Branding

    Product Card labels will be displayed on three lines by default

    4.30

    123

    0.51

    27 Apr 2023

    Anatomy

    import { ProductCard, Menu } from "@wonderflow/react-components";
    export default () => { return (
    <ProductCard
    subtitle="Branding"
    title="Product Card..."
    source={['https://...']}
    rating={4.3}
    sentiment={0.51}
    feedbackCount={123}
    footer="27 Apr 2023"
    menuActions={<Menu>...</Menu>}
    />
    ); };

    tsx

    Usage guidelines

    The product Card is most often used inside the main content area. Cards in a grid should be the same height.

    Best practices

    • Product cards should group related information.
    • Use product cards to display content and actions on a single topic.

    Features

    Orientation

    Cards can have a vertical or horizontal image orientation.

    Media

    Card images are specifically designed to maintain the aspect ratio while filling the width of the card. This ensures that the images are displayed proportionally and avoids any distortion or stretching. Card media can accommodate up to four cards.

    The Card header serves as an area to display a title, optional subtitle and actions that are relevant to the entire card. In situations where additional actions are present, we utilise a Menu to accommodate them.

    For the Title, we recommend a maximum of three lines, with a minimum height of 84px. As for the subtitle, it is recommended to keep it to a single line.

    KPIs

    Cards content most commonly displays the product KPIs such as Rating, Feedback count and Sentiment Index. We recommended showing a maximum of three KPIs.

    API Reference

    ProductCard

    PROPERTY
    TYPE
    DEFAULT
    direction
    enum
    vertical
    bordered
    boolean
    false
    highlightOnHover
    boolean
    false
    source
    Array<string>
    []
    ratio
    string
    1/1
    title
    string
    subtitle
    string
    titleRows
    number
    3
    rating
    number
    nps
    number
    feedbackCount
    number
    votesRating
    number
    votesCount
    number
    sentiment
    number
    tgw
    number
    priceMin
    number
    priceMax
    number
    currency
    enum
    EUR
    currencyDecimals
    number
    0
    groups
    number
    users
    number
    usersCap
    number
    skus
    number
    skusCap
    number
    kpiItems
    number
    3
    kpisRowGap
    TokensTypes['space']
    8
    menuActions
    ReactNode
    overlayActions
    ReactNode
    onClick
    Function
    isLoading
    boolean
    false
    children
    ReactNode

    ProductCard.Media

    PROPERTY
    TYPE
    DEFAULT
    source
    Array<string>
    []
    ratio
    string
    1/1
    isLoading
    boolean
    false

    ProductCard.Header

    PROPERTY
    TYPE
    DEFAULT
    title
    string
    subtitle
    string
    description
    string
    titleRows
    number
    3
    descriptionRows
    number
    3
    menuActions
    ReactNode
    isLoading
    boolean
    false

    ProductCard.Kpis

    PROPERTY
    TYPE
    DEFAULT
    rating
    number
    nps
    number
    feedbackCount
    number
    votesRating
    number
    votesCount
    number
    sentiment
    number
    tgw
    number
    priceMin
    number
    priceMax
    number
    currency
    enum
    EUR
    currencyDecimals
    number
    0
    groups
    number
    users
    number
    usersCap
    number
    skus
    number
    skusCap
    number
    kpiItems
    number
    3
    kpisRowGap
    TokensTypes['space']
    8
    isLoading
    boolean
    false

    Created by Wonderflow Design Team for Wonderflow.

    © Wonderflow 2024