Brand Bonus Table Widget

⚠️ Important Notice: We are transitioning from <bw-widget> to <nw-blocks> tags. While <bw-widget> is still supported for backward compatibility, all new implementations should use <nw-blocks>. Please update your existing widgets when possible.


Overview

The Brand Bonus Table Widget displays multiple brands in a structured table format with bonus information and customizable columns. It’s perfect for creating comparison tables showing multiple casino or sportsbook brands with their bonus offers, game counts, or additional information.

Key Features:

  • Multi-brand table display (2 or 3 columns)
  • Customizable column headers
  • Customizable header background color
  • Clickable brand names with review page links
  • Affiliate link indicators
  • Responsive card-style layout on mobile
  • Automatic filtering of inactive brands
  • Translation support for column labels
  • Optional third column (game count or additional info)

Basic Usage

Standard Three-Column Table

Expand me...

Two-Column Table (No Third Column)

Expand me...

Sports Betting Comparison

Expand me...

Localized for French Market

Expand me...


Attributes Reference

Attribute Type Default Description
id string required Component identifier (brandbonustable)
bonustableID string "" Required - Unique identifier for the bonus table configuration in Sanity CMS
language string "en" Language code for translations (e.g., “fr”, “en”, “es”)
country string "ZZ" Country code (e.g., “FR”, “US”, “UK”, “ZZ” for generic)
product string "" Product type (“CA” for Casino, “SB” for Sports Betting)
column1title string "" Header text for the first column (Brand names)
column2title string "" Header text for the second column (Bonus amounts)
column3title string "" Header text for the third column (Optional - Game count or additional info)
headercolor string "#F4F4F4" Background color for the table header row
target string "_blank" Link target attribute for brand links
rel string "nofollow" Link rel attribute for brand links
trackinglinktarget string "" Additional tracking target parameter
cloakedlink string "" Optional cloaked link (typically not used for tables)

Table Structure

Column Configuration

The table supports 2 or 3 columns:

Two-Column Layout

Column 1 Column 2
Brand Name (linked) Bonus Amount

Three-Column Layout

Column 1 Column 2 Column 3
Brand Name (linked) Bonus Amount Game Count or Additional Info

Column 1: Brand Names

  • Content: Brand names as clickable links
  • Links: Points to review pages or affiliate links
  • Icons: Affiliate links show a special icon indicator
  • Link Types:
    • Internal review page links: /review-page-url
    • Affiliate tracking links: /go/tracking-link

Column 2: Bonus Amounts

  • Content: Maximum deposit/bonus amounts
  • Format: Typically numerical values or bonus descriptions
  • Source: Fetched from brand bonus configuration

Column 3: Optional Column

  • Game Count Mode: Displays number of available games
  • Additional Info Mode: Shows custom additional information
  • Display: Only shown if configured in Sanity CMS
  • Fallback: Uses “-” when data is unavailable

Bonus Table ID

The bonustableID is a critical attribute that references a specific table configuration in your Sanity CMS:

Format

{description}-{date}

Examples

bonustableID="david-brand-bonus-table-20250814"
bonustableID="casino-comparison-table"
bonustableID="sportsbook-table-2024"
bonustableID="french-casino-table"

What the Bonus Table ID Controls

  • List of brands to display
  • Order of brands in the table
  • Which brands are active/inactive
  • Third column configuration (show/hide, type)
  • Brand-specific data (bonuses, game counts, additional info)

Translation Keys

When column titles are not explicitly provided, the widget uses default translation keys:

Translation Key Default Purpose Customizable Via
bti-casino-name Column 1 default column1title
bti-bonus-amt Column 2 default column2title
bti-game-count Column 3 (game mode) column3title
bti-info Column 3 (info mode) column3title

Best Practice: Always provide custom column titles for clarity and SEO benefits.


Responsive Design

Desktop View

  • Standard HTML table layout
  • Fixed column widths
  • Header row with custom background color
  • Hover effects on rows

Mobile/Card View (3 columns)

  • Transforms into card-style layout
  • Each brand becomes a separate card
  • Column headers appear as labels within each card
  • Optimized for touch interactions

Mobile/Standard (2 columns)

  • Maintains table structure
  • Responsive column sizing
  • Stacked layout on very small screens

The widget automatically handles different link types:

/{reviewPageUrl}
  • Internal links to brand review pages
  • No special indicator
  • Standard text styling
/go/{trackingLink}
  • Affiliate tracking redirects
  • Shows affiliate link icon
  • Indicates sponsored/affiliate relationship

The widget automatically detects link types based on URL patterns and applies appropriate styling and indicators.


Header Color Customization

Customize the header background to match your design:

Solid Colors

headercolor="#05842A"           <!-- Green -->
headercolor="#1E90FF"           <!-- Blue -->
headercolor="#FF6B35"           <!-- Orange -->

CSS Color Formats

headercolor="#05842A"           <!-- Hex -->
headercolor="rgb(5, 132, 42)"   <!-- RGB -->
headercolor="rgba(5, 132, 42, 0.9)" <!-- RGBA -->
headercolor="darkgreen"         <!-- Named color -->

Data Management in Sanity CMS

The Brand Bonus Table widget pulls data from Sanity CMS based on the bonustableID. Your Sanity configuration should include:

Required Fields

  • Table ID: Unique identifier
  • Brand List: Array of brands to display
  • Brand Order: Sequence of brands
  • Active Status: Per-brand activation

Optional Fields

  • Show Number of Games: Toggle game count column
  • Show Additional Info: Toggle additional info column
  • Is Body Text Black: Text color configuration
  • Brand-specific data:
    • Review page URLs
    • Max deposit amounts
    • Game counts
    • Additional information text

Backward Compatibility

All examples above use the new <nw-blocks> tag. If you need to use the legacy <bw-widget> tag for backward compatibility, simply replace <nw-blocks> with <bw-widget> in any example:

<!-- New way (recommended) -->
<nw-blocks id="brandbonustable" bonustableID="your-table-id" product="CA" >
</nw-blocks>

<!-- Old way (still supported) -->
<bw-widget id="brandbonustable" bonustableID="your-table-id" product="CA" >
</bw-widget>

Both tags work identically and support all the same attributes and functionality.


Common Use Cases

1. Casino Comparison Table

<nw-blocks id="brandbonustable" 
    bonustableID="top-casinos-2024" 
    language="en" 
    country="US"
    product="CA"
    column1title="Casino"
    column2title="Welcome Bonus"
    column3title="Games Available"
    headercolor="#05842A" >
</nw-blocks>

2. Sports Betting Comparison

<nw-blocks id="brandbonustable" 
    bonustableID="best-sportsbooks" 
    language="en" 
    country="UK"
    product="SB"
    column1title="Sportsbook"
    column2title="Sign-Up Offer"
    column3title="Betting Markets"
    headercolor="#1E90FF" >
</nw-blocks>

3. Simple Two-Column List

<nw-blocks id="brandbonustable" 
    bonustableID="quick-comparison" 
    language="en" 
    country="CA"
    product="CA"
    column1title="Brand"
    column2title="Bonus"
    headercolor="#333333" >
</nw-blocks>

4. Multilingual Table (German)

<nw-blocks id="brandbonustable" 
    bonustableID="german-casino-table" 
    language="de" 
    country="DE"
    product="CA"
    column1title="Casino Name"
    column2title="Willkommensbonus"
    column3title="Anzahl der Spiele"
    headercolor="#05842A" >
</nw-blocks>

Best Practices

1. Descriptive Column Titles

Use clear, concise headers that accurately describe the column content:

column1title="Casino Name"        <!-- Clear -->
column1title="Brand"              <!-- Less clear -->

2. Consistent Branding

Match header colors to your site’s color scheme for visual consistency.

3. Accurate Bonus Table ID

Ensure the bonustableID matches exactly what’s configured in Sanity CMS.

4. Product Specificity

Always specify the correct product type (“CA” or “SB”) for accurate data.

5. Language and Country Alignment

Match language with country for proper localization:

language="fr" country="FR"  <!-- Correct -->
language="en" country="FR"  <!-- Inconsistent -->

6. Third Column Strategy

Decide whether to show game counts or additional info based on your content strategy.

7. Mobile Testing

Always test the table on mobile devices, especially 3-column layouts which transform into cards.


Styling Notes

CSS Classes

  • .tb-container: Main container wrapper
  • Table with responsive styling
  • Card mode classes for mobile layouts
  • Header color customization via inline styles

Customization Points

  • Header background color
  • Text colors (configurable via Sanity)
  • Column widths (automatic distribution)
  • Mobile breakpoints

Error Handling

Inactive Brands

Brands marked as inactive in Sanity are automatically filtered out and not displayed.

Missing Data

When data is unavailable for a particular field, the widget displays:

-

Missing Review URLs

Brands without review URLs appear as plain text (not linked).

Invalid Bonus Table ID

If the bonustableID doesn’t match any configuration in Sanity, the widget may not display or show an error message.


SEO Considerations

  1. Column Headers: Use descriptive titles with relevant keywords
  2. Brand Links: Internal links help with site structure
  3. Structured Data: Table format is crawlable by search engines
  4. Alt Text: Brand names provide context
  5. Meaningful Content: Ensure bonus amounts and info are accurate and up-to-date

Performance Tips

  1. Limit Table Size: Keep brand lists reasonable (typically 5-20 brands)
  2. Optimize Images: If brand logos are added, ensure they’re optimized
  3. Cache Configuration: Leverage caching for Sanity data
  4. Lazy Loading: Consider lazy loading for tables below the fold