Migration Notice: We are transitioning from <bw-widget> to <nw-blocks> tags. While both are currently supported for backward compatibility, <nw-blocks> is now the recommended tag for all new implementations. Existing <bw-widget> implementations will continue to function.
Match Overview widgets provide dynamic sports event information including team details, match schedules, predictions, and venue information. These widgets support multiple sports (football, MMA, basketball) with automatic localization and timezone handling.
Available Widgets:
Displays detailed match information including team names, logos, league details, date/time, and venue. Automatically adapts layout based on sport type (football, MMA, basketball).
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | Yes | - | Must be “matchOverview” |
matchid |
string | Yes | - | Unique match identifier (format: team1-team2-YYYYMMDD or sport-fighter1-fighter2-YYYYMMDD) |
language |
string | No | Auto-detected | ISO 639-1 language code for localization |
country |
string | No | Auto-detected | ISO 3166-1 country code for regional content |
timezone |
string | No | Auto-detected | IANA timezone identifier (e.g., “Europe/Paris”) |
ctacolors |
string | No | “#05842A” | CTA button background color |
ctahovercolors |
string | No | “#096725” | CTA button hover state color |
referer |
string | No | - | Referrer tracking parameter |
Displays betting predictions for a match with customizable styling. Shows odds and predictions for different outcomes (win/draw/loss).
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | Yes | - | Must be “matchPrediction” |
matchid |
string | Yes | - | Match identifier matching the matchOverview format |
language |
string | No | Auto-detected | Language code for prediction text |
country |
string | No | Auto-detected | Country code for regional odds |
timezone |
string | No | Auto-detected | Timezone for displaying match times |
ctacolors |
string/array | No | “#05842A” | Button background color(s) |
ctahovercolors |
string/array | No | “#096725” | Button hover color(s) |
configuration |
JSON | No | {} | Styling configuration object |
| Property | Type | Default | Description |
|---|---|---|---|
button-colors |
array | ["#05842A", “#05842A”] | Array of button background colors [normal, hover] |
header-color |
string | “#000000” | Header text color |
header-bgcolor |
string | “#FFFFFF” | Header background color |
width |
string | “100%” | Widget width with units |
Match IDs follow specific naming conventions based on sport type:
Format: {team1}-{team2}-{YYYYMMDD}
Examples:
parissaint-germain-rcstrasbourg-20230529france-cameroon-20230614Format: mma-{fighter1}-{fighter2}-{YYYYMMDD}
Examples:
mma-volkanovskialexander-sterlingaljamain-20240108mma-seano-malley-zhangweili-20240112Format: basketball-{team1}-{team2}-{YYYYMMDD}
Examples:
basketball-chicagobulls-goldenstatewarriors-20240119Important Notes:
The widgets automatically detect and adapt styling based on sport type:
| Sport | Class Applied | Features |
|---|---|---|
| Football | sport-football |
Standard two-team layout with versus display |
| MMA | sport-mma |
Fighter profiles with match details below |
| Basketball | sport-basketball |
Team-based layout similar to football |
Each sport type has customized styling for:
<nw-blocks
id="matchOverview"
matchid="barcelona-realmadrid-20250215">
</nw-blocks>
<!-- Fight Overview -->
<nw-blocks
id="matchOverview"
matchid="mma-mcgregorconor-poirierdustin-20250301">
</nw-blocks>
<!-- Betting Predictions -->
<nw-blocks
id="matchPrediction"
matchid="mma-mcgregorconor-poirierdustin-20250301"
ctacolors="#FF5722"
ctahovercolors="#E64A19">
</nw-blocks>
<nw-blocks
id="matchOverview"
matchid="psg-olympiquemarseille-20250310"
language="fr"
country="FR"
timezone="Europe/Paris">
</nw-blocks>
<nw-blocks
id="matchPrediction"
matchid="liverpool-manchesterunited-20250320"
configuration='{
"button-colors": ["#C8102E", "#9C0824"],
"header-color": "#FFFFFF",
"header-bgcolor": "#C8102E",
"width": "300px"
}'>
</nw-blocks>
language and country attributes for international audiencestimezone to ensure correct match time display for usersctacolors and ctahovercolors for consistent brandingMatch data is retrieved from Sanity CMS using the match ID as the key. Required data includes:
Widgets utilize CloudFlare KV for caching:
All examples above use the new <nw-blocks> tag. For backward compatibility, you can still use <bw-widget>:
<!-- Old syntax (still supported) -->
<bw-widget
id="matchOverview"
matchid="parissaint-germain-rcstrasbourg-20230529">
</bw-widget>
<!-- New syntax (recommended) -->
<nw-blocks
id="matchOverview"
matchid="parissaint-germain-rcstrasbourg-20230529">
</nw-blocks>
Both tags work identically, but <nw-blocks> is recommended for all new implementations.