ValyroUI Русская версия

Product Spotlight

Featured product: tagged photo, price, rating and actions. Pro · Shop and payments › Catalog

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add product-spotlight
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ProductSpotlight } from 'valyro-ui-pro';

Props

PropTypeDefault
headingReactNodeLine above the card: "Best match: Drift Runner".
reasonReactNodeWhy it was picked, under the heading.
imageSrc *stringProduct photo.
imageAlt *stringText alternative of the photo.
imageBadgeReactNodeChip over the photo: stock, a discount.
imageBadgeTone'success' | 'warning' | 'danger' | 'accent' | 'neutral''success'Color of the chip. Default success.
metaReactNodeSmall uppercase line: "Shoes · Bone".
name *ReactNodeProduct name.
price *numberPrice in the currency's major unit.
currencystring'USD'ISO 4217 code. Default USD.
ratingnumberAverage rating out of 5.
reviewCountnumberNumber of reviews after the score.
descriptionReactNodeA sentence or two about fit and use.
actionsReactNodeButtons at the bottom.
headingLevel1 | 2 | 3 | 4 | 5 | 63Level of the heading or, without it, of the name (default 3).
localestringBCP 47 locale for the price and counts.
labelsPartial<ProductSpotlightLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Product Filters · Next: Reviews Summary · All Shop and payments