# Scrollable Tabs

The TabStrip allows you to scroll through its tabs when the tab list cannot fit in the component boundaries. It provides a rich API for customizing the scroll logic and the TabStrip appearance based on your preference.

## Setup

To enable the scrolling of the tab list, configure the [`scrollable`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripcomponent#scrollable) option. It accepts both `boolean` and [`ScrollableSettings`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings) parameters. The default value of the `scrollable` option is `false`.

If you use a [`ScrollableSettings`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings) parameter, the TabStrip enables you to configure the following options:

* `enabled`—Determines if the scrolling is initially enabled. The default value is `true`.
* `scrollButtons`—Determines the visibility behavior of the scroll buttons in the tab list. The default value is `auto`.
* `scrollButtonsPosition`—Allows customizing the position of the scroll buttons. The default value is `split`.
* `mouseScroll`—Specifies if the tab list scroll position can be changed by mouse scrolling. The default value is `true`.
* `buttonScrollSpeed`—Sets the tab list scroll speed in pixels when clicking the scroll buttons. The default value is `100px`.
* `prevButtonIcon`—Allows specifying a custom icon for the `previous` scroll button.
* `nextButtonIcon`—Allows specifying a custom icon for the `next` scroll button.

The following example demonstrates a scrollable TabStrip in action.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/basic/source.txt)

## Scroll Buttons Visibility

You can configure the TabStrip to display scroll buttons in the tab list. To customize this behavior, use the [`scrollButtons`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#scrollbuttons) option of the TabStrip [`ScrollableSettings`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings). This option accepts the following values of type [`TabStripScrollButtonsVisibility`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollbuttonsvisibility):

* `auto`(Default)—The scroll buttons will be automatically shown if the tabs do not fit inside the TabStrip boundaries, and hidden otherwise.
* `visible`—The scroll buttons will be constantly visible. If the tabs fit inside the TabStrip boundaries, the buttons will be disabled.
* `hidden`—The scroll buttons won't be displayed.

The following example demonstrates this option in action.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/buttons/source.txt)

## Scroll Buttons Position

By default, the TabStrip renders its scroll buttons on both ends of the tab list. To customize the position of the scroll buttons, use the [`scrollButtonsPosition`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#scrollbuttonsposition) property of the TabStrip [`ScrollableSettings`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings). This option accepts the following values of type [`TabStripScrollButtonsPosition`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollbuttonsposition):

* `split`(Default)—The scroll buttons will be rendered on both sides of the tab list.
* `start`—The scroll buttons will be rendered before the tab list.
* `end`—The scroll buttons will be rendered after the tab list.

The following example demonstrates the different positions of the scroll buttons.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/buttons_position/source.txt)

## Scroll Button Icons

The TabStrip allows you to change the default scroll button icons rendered in the tab list by using predefined and custom [font icons](https://www.telerik.com/kendo-angular-ui/components/layout/tabstrip/scrollable#using-font-icons) or [SVG icons](https://www.telerik.com/kendo-angular-ui/components/layout/tabstrip/scrollable#using-svg-icons).

> As of R2 2023 (`v13.0.0`) the default icon type in the Kendo UI for Angular components and Kendo UI themes is changed from `font` to `svg`. Set the `svgIcon` property, or [Continue Using Font Icons](https://www.telerik.com/kendo-angular-ui/components/styling/migrating-font-svg#continue-using-font-icons).

### Using SVG Icons

To display SVG icons for the TabStrip scroll buttons, set the [prevSVGButtonIcon](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#prevsvgbuttonicon) and [nextSVGButtonIcon](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#nextsvgbuttonicon) properties of the `TabStripScrollableSettings` to the necessary [`SVGIcon`](https://www.telerik.com/kendo-angular-ui/components/icons/api/svgicon). For details, go to the [list of SVG icons supported by Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list).

```html
<kendo-tabstrip [scrollable]="settings"></kendo-tabstrip>
```

```ts
import {chevronLeftIcon, chevronRightIcon} from '@progress/kendo-svg-icons';

public settings:TabStripScrollableSettings = {
    prevSVGButtonIcon: chevronLeftIcon,
    nextSVGButtonIcon: chevronRightIcon,
};
```

The following example demonstrates how to display SVG scroll button icons.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/svg-icon/source.txt)

### Using Font Icons

To display Font icons inside the TabStrip scroll buttons:

1. Use the [`ICON_SETTINGS`](https://www.telerik.com/kendo-angular-ui/components/icons/api/icon_settings) token of the Icons package and set the icon type to `font`. For more information, go to the topic about [icon settings](https://www.telerik.com/kendo-angular-ui/components/icons/icon-settings).
2. Set the [prevButtonIcon](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#prevbuttonicon) and [nextButtonIcon](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#nextbuttonicon) options of the TabStrip [ScrollableSettings](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings). Both options accept a CSS class or multiple classes separated by spaces—this allows you to render [font icons provided by Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/components/icons/icon/icon-list) and third-party icons like [FontAwesome](https://fontawesome.com/).

   ```html
   <kendo-tabstrip [scrollable]="settings"></kendo-tabstrip>
   ```

   ```ts
   public settings: TabStripScrollableSettings = {
       prevButtonIcon: 'fa fa-arrow-circle-left', // FontAwesome icon
       nextButtonIcon: 'k-font-icon k-i-arrow-right' // Kendo UI font icon
   };
   ```

The following example demonstrates how to replace the default scroll button icons with a Kendo UI font icon class and a FontAwesome icon.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/font-icon/source.txt)

## Adjusting the Scroll Speed

The TabStrip allows you to fine tune the scroll speed of the tabs. To adjust this behavior, use the [`buttonScrollSpeed`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#buttonscrollspeed) option of the TabStrip [`ScrollableSettings`](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings). This option sets the scroll speed in pixels when using the scroll buttons and has a default value of `100px`.

The following example demonstrates how to set custom scroll speed.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/scroll_speed/source.txt)

## Configuring the Mouse Scroll

By default the tabs can be scrolled with mouse wheel (or touchpad, trackpad etc.). In order to disable this behavior, set the [mouseScroll](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings#mouseScroll) option of the TabStrip [ScrollableSettings](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings) to `false`.

The following example demonstrates how to conditionally enable or disable the mouse scrolling.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/tabstrip/scrollable/mouse_scroll/source.txt)

## Suggested Links

* [API Reference of the ScrollableSettings](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollablesettings)
* [API Reference of TabStripScrollButtonsVisibility](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollbuttonsvisibility)
* [API Reference of TabStripScrollButtonsPosition](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripscrollbuttonsposition)
* [API Reference of the TabStripComponent](https://www.telerik.com/kendo-angular-ui/components/layout/api/tabstripcomponent)
