---
title: "Customizing Widget Tabs"
canonical_url: "https://docs.sportradar.com/resources/widgets/docs/tutorials/examples/customizing-tabs"
markdown_url: "https://docs.sportradar.com/resources/widgets/docs/tutorials/examples/customizing-tabs.md"
last_updated: "2026-10-12T14:06:27Z"
---

# Customizing Widget Tabs

Tabs are an important navigation element on many widgets. This tutorial shows you how to customize tab styling, icons, alignment, and behavior to match your design requirements.

## Audience

This tutorial is for developers and integrators who have already integrated Sportradar widgets into their website and want to customize the appearance and behavior of tab components. You should be familiar with:

- Basic widget integration concepts
- CSS styling and selectors
- JavaScript object configuration

## Goals

By completing this tutorial, you will learn how to:

- Configure tab display options (icon only, text only, or combined)
- Apply custom icons to tabs
- Control tab alignment and layout
- Style tabs using CSS classes
- Understand which tabs are available for each widget type

## Prerequisites

To complete this tutorial, you will need:

- A website with an integrated Sportradar widget that uses tabs (such as Live Match Tracker, Match Preview, Tournament Preview, or Head to Head widgets)
- Basic understanding of how to integrate widgets - see the [Getting Started Guide](https://docs.sportradar.com/resources/widgets/docs/tutorials.md)
- Access to modify your website's HTML and CSS files
- A text editor for editing code

> **Info**
>
> Tab customization is performed through the `branding` configuration object when adding a widget with the `SIR` function.

## Understanding Tab Configuration

Widget tabs are configured through the `branding` object when adding a widget. Tab customization happens in two namespaces:

- **Global tabs settings** - Applied directly under `branding.tabs`
- **Widget-specific settings** - Applied under `branding.namespaces.avTabSwitcher.tabs`

### Configuration Hierarchy

```javascript
SIR('addWidget', '#container', 'match.preview', {
    matchId: 12345,
    branding: {
        tabs: {
            // Global tab settings apply here
            option: 'iconText',
            variant: 'standard'
        },
        namespaces: {
            avTabSwitcher: {
                tabs: {
                    // Widget-specific overrides apply here
                    align: 'center',
                    useClientTheming: true
                }
            }
        }
    }
});
```

## Tab Configuration Options {#tab-settings}

The following configuration options control tab appearance and behavior. All settings are applied within the `branding.tabs` or `branding.namespaces.avTabSwitcher.tabs` object.

| Property           | Type    | Options                    | Description                                                                                                                                                    |
| ------------------ | ------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `option`           | string  | `iconText`, `icon`, `text` | Controls what content appears in tabs:<br/>• `iconText` - Display both icon and text<br/>• `icon` - Display only icons<br/>• `text` - Display only text labels |
| `variant`          | string  | `fullWidth`, `standard`    | Controls horizontal space usage:<br/>• `fullWidth` - Tabs expand to fill available width<br/>• `standard` - Tabs use minimum required width                    |
| `align`            | string  | `start`, `center`, `end`   | Horizontal alignment when `variant` is `standard`:<br/>• `start` - Left-aligned<br/>• `center` - Center-aligned<br/>• `end` - Right-aligned                    |
| `iconPosition`     | string  | `start`, `end`             | Icon placement when `option` is `iconText`:<br/>• `start` - Icon before text<br/>• `end` - Icon after text                                                     |
| `icons`            | object  | Tab ID to URL mapping      | Custom icon paths for specific tabs. See [Available Tabs](#tabs-used-per-widget) for tab IDs                                                                   |
| `arrowIcon`        | string  | Image URL                  | Path to custom arrow/indicator icon file                                                                                                                       |
| `useClientTheming` | boolean | `true`, `false`            | When `true`, removes default styling and applies `.srct-` CSS classes for custom styling. See [CSS Classes](#css-selectors)                                    |

> **Tip**
>
> Use `useClientTheming: true` when you want complete control over tab styling with your own CSS. This disables default theme styles and applies classes prefixed with `.srct-` for easier customization.

## Custom Styling With CSS {#css-selectors}

When `useClientTheming` is enabled (set to `true`), default styling is removed and specific CSS classes are applied for custom styling. This gives you complete control over tab appearance.

### Available CSS Classes

| CSS Class                      | Applied To          | Description                                    |
| ------------------------------ | ------------------- | ---------------------------------------------- |
| `.srct-tabs`                   | Tabs container      | Wrapper element containing all tabs            |
| `.srct-tab`                    | Individual tab      | Each tab element                               |
| `.srct-tab__content`           | Tab content wrapper | Container for icon, text, and indicator        |
| `.srct-tab--active`            | Active tab          | Applied to the currently selected tab          |
| `.srct-tab__indicator`         | Tab indicator       | Visual indicator element (typically underline) |
| `.srct-tab__indicator--active` | Active indicator    | Indicator of the active tab                    |
| `.srct-tab__arrow`             | Arrow element       | Navigation arrow icon                          |
| `.srct-tab__text-label`        | Text label          | Tab text content                               |
| `.srct-tab__icon`              | Icon element        | Tab icon image                                 |

### Styling Example

```css
/* Basic tab styling */
.sr-bb .srct-tab {
    background-color: #f5f5f5;
    color: #333;
}

/* Active tab styling */
.sr-bb .srct-tab--active {
    background-color: #ffffff;
    color: #1d4ed8;
}

/* Tab indicator styling */
.sr-bb .srct-tab__indicator--active {
    background-color: #1d4ed8;
}

/* Icon styling */
.sr-bb .srct-tab__icon {
    color: #ff0000;
    background-color: #ffffff;
}
```

> **Warning**
>
> All widget styles must be scoped within the `.sr-bb` container class to ensure proper isolation and prevent conflicts with your site's CSS.

## Available Tabs by Widget {#tabs-used-per-widget}

Different widgets use different sets of tabs. Below is a reference of which tab IDs are available for each widget type.

### Live Match Tracker

**Available Tabs:** `statistics`, `detailedStatistics`, `headToHead`, `standings`, `timeline`, `lineups`, `boxscore`, `probabilities`, `pointByPoint`, `scorecard`, `leaderboard`, `avStream`

**Pitch Visualization Tabs** (when `layout: 'single'` is set):
`pitchBadminton`, `pitchBaseball`, `pitchBasketball`, `pitchBeachVolleyball`, `pitchCricket`, `pitchDarts`, `pitchFutsal`, `pitchHandball`, `pitchHockey`, `pitchAmericanFootball`, `pitchRugby`, `pitchSnooker`, `pitchSoccer`, `pitchSquash`, `pitchTableTennis`, `pitchTennis`, `pitchVolleyball`

### Match Preview

**Available Tabs:** `matchInfo`, `leaders`, `lineups`, `standings`, `teamStats`, `leaderboard`, `playerProfile`, `ranking`

### Tournament Preview

**Available Tabs:** `overview`, `leaders`, `results`, `standings`, `teams`

### Head to Head

**Available Tabs:** `headToHead`, `form`, `teamStats`, `teamstatsmatch`, `lastMatches`

## List of All Tabs and Default Icons {#list-of-all-tabs-and-default-icons}

| Tab ID                               |                                                                                                         Matching Icon |
| :----------------------------------- | --------------------------------------------------------------------------------------------------------------------: |
| statistics / teamStats               |                     ![Statistics icon](https://docs.sportradar.com/resources/widgets/static/img/icons/statistics.svg) |
| headToHead                           |                          ![Head To Head icon](https://docs.sportradar.com/resources/widgets/static/img/icons/H2H.svg) |
| standings                            |                       ![Standings icon](https://docs.sportradar.com/resources/widgets/static/img/icons/standings.svg) |
| timeline / plays                     |                         ![Timeline icon](https://docs.sportradar.com/resources/widgets/static/img/icons/timeline.svg) |
| lineups / roster                     |                           ![Lineups icon](https://docs.sportradar.com/resources/widgets/static/img/icons/lineups.svg) |
| boxScore / scorecard                 |                        ![Box Score icon](https://docs.sportradar.com/resources/widgets/static/img/icons/boxscore.svg) |
| overview / matchInfo                 |                         ![Overview icon](https://docs.sportradar.com/resources/widgets/static/img/icons/overview.svg) |
| cup / playoffs                       |                            ![Cup icon](https://docs.sportradar.com/resources/widgets/static/img/icons/cup-roster.svg) |
| form                                 |                                 ![Form icon](https://docs.sportradar.com/resources/widgets/static/img/icons/form.svg) |
| teams                                |                               ![Teams icon](https://docs.sportradar.com/resources/widgets/static/img/icons/teams.svg) |
| leaders                              |                           ![Leaders icon](https://docs.sportradar.com/resources/widgets/static/img/icons/leaders.svg) |
| leaderboard                          |                       ![Leaders icon](https://docs.sportradar.com/resources/widgets/static/img/icons/leaderboard.svg) |
| facts                                |                               ![Facts icon](https://docs.sportradar.com/resources/widgets/static/img/icons/facts.svg) |
| ranking                              |                             ![Facts icon](https://docs.sportradar.com/resources/widgets/static/img/icons/ranking.svg) |
| pointByPoint                         |                         ![Point By icon](https://docs.sportradar.com/resources/widgets/static/img/icons/point_by.svg) |
| probabilities                        |               ![Probabilities icon](https://docs.sportradar.com/resources/widgets/static/img/icons/probabilities.svg) |
| results / lastMeetings / lastMatches |                           ![Results icon](https://docs.sportradar.com/resources/widgets/static/img/icons/results.svg) |
| playerProfile                        |                    ![Player Profile icon](https://docs.sportradar.com/resources/widgets/static/img/icons/profile.svg) |
| pitchDarts                           |           ![Darts Dartboard icon](https://docs.sportradar.com/resources/widgets/static/img/icons/darts-dartboard.svg) |
| pitchAmericanFootball                | ![American Football icon](https://docs.sportradar.com/resources/widgets/static/img/icons/american-football-field.svg) |
| pitchBadminton                       |           ![Badminton Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/badminton-court.svg) |
| pitchBaseball                        |             ![Baseball field icon](https://docs.sportradar.com/resources/widgets/static/img/icons/baseball-field.svg) |
| pitchBasketball                      |         ![Basketball Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/basketball-court.svg) |
| pitchBeachVolleyball                 |   ![Volleyball Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/beach-volleyball-court.svg) |
| pitchFutsal                          |                 ![Futsal Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/futsal-court.svg) |
| pitchHandball                        |             ![Handball Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/handball-court.svg) |
| pitchHockey                          |                   ![Hockey Rink icon](https://docs.sportradar.com/resources/widgets/static/img/icons/hockey-rink.svg) |
| pitchRugby                           |                   ![Rugby Pitch icon](https://docs.sportradar.com/resources/widgets/static/img/icons/rugby-pitch.svg) |
| pitchSnooker                         |               ![Snooker Pitch icon](https://docs.sportradar.com/resources/widgets/static/img/icons/snooker-table.svg) |
| pitchTableTennis                     |     ![Table Tennis Table icon](https://docs.sportradar.com/resources/widgets/static/img/icons/table-tennis-table.svg) |
| pitchTennis                          |                  ![Table Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/tennis-court.svg) |
| pitchVolleyball                      |   ![Volleyball Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/beach-volleyball-court.svg) |
| pitchSquash                          |                 ![Squash Court icon](https://docs.sportradar.com/resources/widgets/static/img/icons/squash-court.svg) |
| pitchSoccer                          |                       ![Soccer icon](https://docs.sportradar.com/resources/widgets/static/img/icons/soccer-pitch.svg) |
| avStream                             |                          ![Soccer icon](https://docs.sportradar.com/resources/widgets/static/img/icons/av-stream.svg) |

## Complete Implementation Example {#integration-example}

This example demonstrates how to customize tabs for a Match Preview widget with custom styling, icons, and configuration.

### Step 1: Create HTML Structure

Create your HTML file with the widget container and necessary styling:

```html
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Match Preview Tabs Configuration</title>
        <style>
            .sr-widgets {
                background: #001212;
                color: #ffffff;
            }

            /* Custom tab styling */
            .sr-bb .srct-tab {
                background: #ac1a2f;
                color: #ffffff;
            }

            /* Active tab styling */
            .sr-bb .srct-tab--active {
                background: #ffffff;
                color: #ac1a2f;
            }

            /* Hover effect */
            .sr-bb .srct-tab:hover {
                background: #8d1526;
            }

            .sr-bb .srct-tab--active:hover {
                background: #ffffff;
            }
        </style>
    </head>
    <body>
        <!-- Widget container -->
        <div class="sr-widgets">
            <div class="sr-widget sr-widget-1"></div>
        </div>

        <!-- Widget script will go here -->
    </body>
</html>
```

### Step 2: Configure Widget With Tab Settings

Add the widget loader script and configuration:

```html
        <script>
            (function (a, b, c, d, e, f, g, h, i) {
                a[e] ||
                    ((i = a[e] =
                        function () {
                            (a[e].q = a[e].q || []).push(arguments);
                        }),
                    (i.l = 1 * new Date()),
                    (i.o = f),
                    (g = b.createElement(c)),
                    (h = b.getElementsByTagName(c)[0]),
                    (g.async = 1),
                    (g.src = d),
                    g.setAttribute('n', e),
                    h.parentNode.insertBefore(g, h));
            })(window, document, 'script', 'https://widgets.sir.sportradar.com/sportradar/widgetloader', 'SIR', {
                theme: false,
                language: 'en'
            });

            SIR('addWidget', '.sr-widget-1', 'match.preview', {
                matchId: 12345, // Replace with your match ID
                branding: {
                    tabs: {
                        // Display icons with text
                        option: 'iconText',
                        // Icon appears before text
                        iconPosition: 'start',
                        // Tabs don't expand to full width
                        variant: 'standard'
                    },
                    namespaces: {
                        avTabSwitcher: {
                            tabs: {
                                // Right-align tabs
                                align: "end",
                                // Custom icon for avStream tab
                                icons: {
                                    "avStream": "https://apidocs.sportradar.com/resources/widgets/docs/img/logo.svg"
                                },
                                // Enable custom CSS styling
                                useClientTheming: true
                            }
                        }
                    }
                }
            });
        </script>
```

### Step 3: Test Your Implementation

1. Replace `matchId: 12345` with an actual match ID
2. Open the HTML file in a browser
3. Verify that:
   - Tabs appear with your custom styling
   - Icons and text are displayed correctly
   - Active tab has the correct appearance
   - Tab alignment matches your configuration

### Configuration Breakdown

**Display Options:**

- `option: 'iconText'` - Shows both icons and text labels
- `iconPosition: 'start'` - Places icons before text

**Layout Options:**

- `variant: 'standard'` - Tabs use minimum width (not full width)
- `align: 'end'` - Tabs are right-aligned

**Styling:**

- `useClientTheming: true` - Enables custom CSS classes (`.srct-*`)
- Custom CSS defines red background for inactive tabs, white for active tabs

**Custom Icons:**

- `icons.avStream` - Provides custom icon URL for the stream tab

> **Tip**
>
> Start with a simple configuration and add customizations incrementally. Test after each change to ensure everything works as expected.

## Common Customization Scenarios

### Icon-Only Tabs

For a minimal, icon-only interface:

```javascript
SIR('addWidget', '#container', 'match.preview', {
    matchId: 12345,
    branding: {
        tabs: {
            option: 'icon',  // Show only icons
            variant: 'fullWidth'  // Expand to full width
        }
    }
});
```

### Text-Only Tabs

For a text-focused design:

```javascript
SIR('addWidget', '#container', 'match.preview', {
    matchId: 12345,
    branding: {
        tabs: {
            option: 'text',  // Show only text
            variant: 'standard',
            align: 'center'  // Center the tabs
        }
    }
});
```

### Custom Icons for All Tabs

Replace default icons with your own:

```javascript
SIR('addWidget', '#container', 'match.preview', {
    matchId: 12345,
    branding: {
        namespaces: {
            avTabSwitcher: {
                tabs: {
                    option: 'iconText',
                    icons: {
                        "matchInfo": "/path/to/info-icon.svg",
                        "lineups": "/path/to/lineup-icon.svg",
                        "standings": "/path/to/standings-icon.svg"
                    }
                }
            }
        }
    }
});
```

## Further Reading

- [Widgets Theming](https://docs.sportradar.com/resources/widgets/docs/tutorials/theming-widgets.md) - Comprehensive guide to widget theming and styling
- [Match Preview Widget](https://docs.sportradar.com/resources/widgets/docs/match-preview/match-preview.md) - Complete Match Preview widget documentation
- [SIR API Reference](https://docs.sportradar.com/resources/widgets/docs/tutorials/SIR.md) - Full widget loader API documentation
