Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development
ProductTitle

Wraps the product name, a product label and the rating.

The ProductTitle is a component commonly used on Product Details Page (PDP). It wraps the product name, a product label and the rating.
Example
Code

Apple Magic Mouse

10% off
Ref.: 99995945

Usage

Import the component


_10
import { ProductTitle } from "@faststore/ui";

Import styles

To apply styles, include the following in your stylesheet:

_10
@import "@faststore/ui/src/components/molecules/ProductTitle/styles.scss";


Examples

Example
Code

Apple Magic Mouse

10% off
Example
Code

Handmade Steel Pants Gorgeous

10% off
Example
Code

Handmade Steel Pants Gorgeous

10% off

Design tokens

Local tokenDefault value/Global token linked
--fs-product-title-text-sizevar(--fs-text-size-title-product)
--fs-product-title-text-weightvar(--fs-text-weight-regular)
--fs-product-title-line-height1.12
--fs-product-title-column-gapvar(--fs-spacing-2)
--fs-product-title-row-gapvar(--fs-spacing-3)

Design tokens: Addendum

Local tokenDefault value/Global token linked
--fs-product-title-addendum-color
var(--fs-color-text-light)
--fs-product-title-addendum-sizevar(--fs-text-size-1)
--fs-product-title-addendum-line-height1.7

Data attributes

You can target and override ProductTitle styles using the following data attributes:
data-fs-product-title
data-fs-product-title-header
data-fs-product-title-addendum

Props

NameTypeDescriptionDefault
testIdstringID to find this component in testing tools (e.g.: cypress, testing library, and jest).fs-product-title
title*string | number | false | true | {} | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortalA react component to be used as the product title, e.g. a `h1`
labelstring | number | false | true | {} | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortalA react component to be used as the product label, e.g. a `DiscountBadge`
refTagstringLabel for reference.Ref.:
refNumberstringA text to be used below the title and the label, such as the product's reference number.
ratingValuenumberThe current value of the rating, a number from 0 to 5.
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
On this page