Match Quiz Play

Football match prediction component. Users predict outcomes across multiple markets (1X2, correct score, player markets, over/under, corners, etc.), earn points, and see results once the match is settled.

Import

import { MatchQuizPlay } from "fansunited-frontend-components";
import { MatchQuizPlayProps, WidgetTemplate } from "fansunited-frontend-core";

Required props

PropTypeDescription
entityIdstringMatch Quiz identifier.
sdkFansUnitedSDKModelSDK instance.
templateWidgetTemplateSTANDARD, SPLIT, or OVERLAY.
languageLanguageTypeDisplay language.

Optional props

PropTypeDescription
themeOptionsCustomThemeOptionsSee Theming.
leadsLeadsOptionsSee Lead Collection.
imagePosition"left" | "right"STANDARD template only.
defaultImagePlaceholderUrlstringFallback image URL.
userIsLoggedInbooleanHost auth state.
signInCTASignInCTADetailsSee Sign-in CTA.
additionalCTAAdditionalCTADetailsSee Additional CTA.
showCountdownbooleanShow countdown timer when the quiz is OPEN.
showTeamLabelsbooleanShow team name labels in fixture components.
showPointsbooleanShow points display per fixture.
showPredictionDetailsbooleanShow detailed result breakdown after completion.
rulesDisplayRulesDisplaySee Rules Display.

Supported markets

CategoryMarkets
Match resultFT_1X2, HT_1X2
ScoreCORRECT_SCORE, CORRECT_SCORE_HT, CORRECT_SCORE_ADVANCED
PlayerPLAYER_SCORE_FIRST_GOAL, PLAYER_SCORE, PLAYER_YELLOW_CARD, PLAYER_RED_CARD, PLAYER_SCORE_HATTRICK, PLAYER_SCORE_TWICE
Over/Under goalsOVER_GOALS_0_5OVER_GOALS_6_5
Over/Under cornersOVER_CORNERS_6_5OVER_CORNERS_13_5
SpecialCORNERS_MATCH, PENALTY_MATCH, RED_CARD_MATCH

Which markets are presented depends on the Match Quiz configuration in the Fans United backend.

Status lifecycle

A Match Quiz progresses through five states:

StatusBehavior
PENDINGNot yet open for predictions.
OPENDefault playable state. Predictions accepted.
LIVEMatch has started — no new predictions accepted.
CLOSEDMatch finished; backend is resolving predictions.
SETTLEDPredictions resolved; leaderboard available.

Countdown timer

showCountdown={true} displays a live countdown when the status is OPEN. It uses predictionsCutoffTime from the entity and automatically hides once the cutoff is reached.

Points system

showPoints={true} reveals the potential and earned points per fixture, with mobile-friendly tooltips. Integrates with the Fans United loyalty system if configured.

Prediction details

showPredictionDetails={true} enables a results breakdown after settling — correct vs. incorrect, per-market scoring, and per-fixture point totals.

Examples

Basic

<MatchQuizPlay
  entityId="match-quiz-123"
  sdk={sdk}
  template={WidgetTemplate.STANDARD}
  language="en"
/>

Fully configured

<MatchQuizPlay
  entityId="match-quiz-123"
  sdk={sdk}
  template={WidgetTemplate.OVERLAY}
  language="en"
  showCountdown
  showTeamLabels
  showPoints
  showPredictionDetails
  userIsLoggedIn={false}
  signInCTA={{ defaultLabel: "Sign in to compete", onClick: openSignIn }}
  leads={{
    position: "after",
    fields: ["fullName", "email"],
    campaignId: "match-quiz-campaign",
    campaignName: "Predictions 2024",
    phoneCountryCode: "44",
    syncWithProfile: true,
  }}
  themeOptions={{ mode: "dark" }}
/>