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

Guided Product Finder

Product finder wizard: branching questions and why a product fits. Pro · Shop and payments › Catalog

A short quiz that recommends products and says why: questions branch on the answers, each answer adds or takes points from products (or rules some out), and the results explain every match — what fits, what to keep in mind and what was ruled out by which answer.

Installation

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

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

Props

PropTypeDefault
questions *FinderQuestion[]Questions in order; next on a question branches by answer.
products *FinderProduct[]Products the answers score.
answersFinderAnswersAnswers by question id.
defaultAnswersFinderAnswersEMPTYInitial answers when uncontrolled. Answers that already complete the quiz open it on the results.
onAnswersChange(answers: FinderAnswers) => voidCalled with all answers after each change.
onComplete(matches: FinderMatch<FinderProduct>[]) => voidCalled when the reader opens the results, with the ranking.
onSelect(product: FinderProduct) => voidCalled when the reader picks a product from the results (in place of following href).
limitnumber3Products shown as matches. Default 3.
loadingbooleanfalseQuestions are loading: skeleton.
errorReactNodeLoading failed: shown instead of the finder.
titleReactNodeHeading. Default: labels.title.
headingLevel2 | 3 | 4 | 53Level of the heading (default 3).
localestringBCP 47 locale for numbers.
labelsPartial<GuidedProductFinderLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Reviews Summary · Next: Location Card · All Shop and payments