Back to Widget Patterns
v2.4Interactive Tooling

Product-Market Fit Quiz

Pre-configured Sean Ellis PMF assessment with built-in questions and result tiers. Composes DiagnosticQuizAssessment. Drop in a complete PMF survey without learning the methodology.

Live preview

Rendered with real component code. Each example demonstrates a documented variant.

Default PMF quiz

Product-Market Fit Assessment

Answer a few questions to get a signal on how this product is landing with you.

Compact (disappointment question only)

Product-Market Fit Assessment

Answer a few questions to get a signal on how this product is landing with you.

React props

Configure the component via props in React or via attributes in HTML.

PropTypeDefaultDescription
productNamestring"this product"Interpolated into question text wherever the product name appears
includeUsageQuestionbooleantrueInclude "How often do you use it?" as question 2
includeOpenEndedbooleantrueInclude "What is the main benefit you receive?" as a free-text question
onComplete(result: QuizResult) => voidundefinedCalled when the quiz finishes; receives the raw QuizResult from DiagnosticQuizAssessment
classNamestringundefinedExtra class forwarded to the root DiagnosticQuizAssessment element

HTML usage

The HTML variant uses the same shared styles and class names. Drop into any stack.

<link rel="stylesheet" href="path/to/diagnostic-quiz-assessment/styles.css">
<link rel="stylesheet" href="path/to/product-market-fit-quiz/styles.css">

<!-- Container populated by the vanilla JS script -->
<section class="dqa" id="pmf-quiz"></section>

<script>
(function () {
  var container = document.getElementById('pmf-quiz');
  var productName = 'our product';

  var questions = [
    {
      id: 'disappointment',
      text: 'How would you feel if you could no longer use ' + productName + '?',
      type: 'single-select',
      options: [
        { value: 'very', label: 'Very disappointed', score: 3 },
        { value: 'somewhat', label: 'Somewhat disappointed', score: 1 },
        { value: 'not', label: 'Not disappointed', score: 0 },
        { value: 'na', label: 'Not applicable / I no longer use it', score: 0 },
      ],
    },
    {
      id: 'usage-frequency',
      text: 'How often do you use ' + productName + '?',
      type: 'single-select',
      options: [
        { value: 'daily', label: 'Daily' },
        { value: 'weekly', label: 'Weekly' },
        { value: 'monthly', label: 'Monthly' },
        { value: 'less', label: 'Less often' },
      ],
    },
    {
      id: 'main-benefit',
      text: 'What is the main benefit you receive from ' + productName + '?',
      type: 'text',
      required: false,
    },
  ];

  var resultTiers = [
    { minScore: 3, maxScore: 99, title: 'Strong PMF',
      description: 'Focus on growth and retention.' },
    { minScore: 1, maxScore: 2, title: 'Emerging PMF',
      description: 'Iterate on what your most-disappointed users value.' },
    { minScore: 0, maxScore: 0, title: 'No PMF yet',
      description: 'Consider repositioning or talking to more users.' },
  ];

  // See html/index.html for the full self-contained implementation.
}());
</script>

Customization

Override these CSS custom properties to integrate the component into your brand.

/* ProductMarketFitQuiz inherits all visual tokens from DiagnosticQuizAssessment.
   Override on the .dqa root to restyle the quiz globally, or use .pmfq to
   scope overrides to PMF quiz instances only. */

.dqa {
  --dqa-bg: var(--brand-surface, white);
  --dqa-text-color: var(--brand-ink, #102542);
  --dqa-muted-color: rgba(16, 37, 66, 0.6);
  --dqa-accent: var(--brand-accent, #1e5fcf);
  --dqa-progress-bg: rgba(0, 0, 0, 0.06);
  --dqa-progress-fill: var(--dqa-accent);
  --dqa-option-border: rgba(0, 0, 0, 0.12);
  --dqa-option-bg: white;
  --dqa-option-bg-selected: rgba(30, 95, 207, 0.08);
  --dqa-option-border-selected: var(--dqa-accent);
  --dqa-button-bg: var(--dqa-accent);
  --dqa-button-text: white;
  --dqa-button-bg-hover: color-mix(in srgb, var(--dqa-accent) 90%, black);
  --dqa-radius: 1rem;
  --dqa-section-padding: 2rem;
  --dqa-gap: 1rem;
}

/* Scope overrides to PMF quiz instances specifically */
.pmfq .dqa {
  --dqa-accent: #00897b;
}