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
| Template | Use case |
|---|---|
WidgetTemplate.STANDARD | Traditional card layout — best for embedding inside articles, sidebars, or feed cards. Supports optional imagePosition. |
WidgetTemplate.SPLIT | Side-by-side content/media — best for landing pages or feature blocks where you want a richer hero. |
WidgetTemplate.OVERLAY | Full-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
| Component | Enum | Templates |
|---|---|---|
PickThePair | PickThePairTemplate | STANDARD, LANDING_PAGE, OVERLAY |
ChanceGame | ChanceGameTemplate | EMBED, 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 byposition, nottemplate.CollectLead(when used standalone) — acceptstemplateand follows the standard three templates.
