Templates

Most game and content components support three layout templates, selected via the template prop. A few components have their own template enums — those exceptions are flagged below.

The three standard templates

TemplateUse case
WidgetTemplate.STANDARDTraditional card layout — best for embedding inside articles, sidebars, or feed cards. Supports optional imagePosition.
WidgetTemplate.SPLITSide-by-side content/media — best for landing pages or feature blocks where you want a richer hero.
WidgetTemplate.OVERLAYFull-screen immersive layout — best for promotions, sponsored content, or focused user journeys.
import { WidgetTemplate } from "fansunited-frontend-core";

<ClassicQuizPlay
  entityId="quiz-123"
  sdk={sdk}
  template={WidgetTemplate.STANDARD}
  imagePosition="left" // STANDARD only
  language="en"
/>

Image position

Only the STANDARD template supports imagePosition:

imagePosition: "left" | "right"

For SPLIT and OVERLAY, the image position is fixed by design.

Default image placeholder

Most components accept defaultImagePlaceholderUrl to provide a fallback image when the entity has none configured.

<ClassicQuizPlay
  {...otherProps}
  defaultImagePlaceholderUrl="https://your-cdn.com/placeholder.png"
/>

Components with custom template enums

ComponentEnumTemplates
PickThePairPickThePairTemplateSTANDARD, LANDING_PAGE, OVERLAY
ChanceGameChanceGameTemplateEMBED, STANDARD, OVERLAY

These two components use the same conceptual layouts but with different enum imports — see each component's page for details.

Components without a template prop

A handful of components do not take template; their layout is driven by configuration or the host page:

  • Discussion — always a single threaded list. Layout is driven by container width.
  • Leaderboard — always a single ranked table.
  • Predictor — multi-tab interface. Layout is fixed; tabs can be enabled/disabled.
  • Betslip — floating widget. Layout is controlled by position, not template.
  • CollectLead (when used standalone) — accepts template and follows the standard three templates.