{"title":"Adding Tabs","id":52004,"link":"https:\/\/env.averta.net\/en\/step\/adding-tabs\/","parent":[51852],"content":"<p>This UI control lets you add a list of tabs in horizontal or vertical direction beside the slider. To add it to the slider you need to set it by <code>control<\/code> method. Below you can find an example. It adds the control and specifies the size of tabs.<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;pre&gt;\r\n  var slider = new MasterSlider();\r\n\r\n  \/\/ adds tabs control\r\n  slider.control( 'tabs', {width:300, height:80} );\r\n\r\n  slider.setup( 'headerSlider', {\r\n    width: 900,\r\n    height: 700,\r\n    \/\/ other options ...\r\n  });\r\n&lt;\/pre&gt;<\/pre>\n<h2>Tabs options<\/h2>\n<p>The slider control method has two arguments. The first argument specifies the name of UI control and the second one is an object of control options. The supported options for <code>tabs<\/code>?are listed below.<\/p>\n<table>\n<thead>\n<tr>\n<td>Option name<\/td>\n<td>Default value<\/td>\n<td>Description<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>autohide<\/td>\n<td>true<\/td>\n<td>Whether it hides the control upon mouse leaves the slider or not.<\/td>\n<\/tr>\n<tr>\n<td>hover<\/td>\n<td>false<\/td>\n<td>Whether the slide changes on hovering thumbnails or not.<\/td>\n<\/tr>\n<tr>\n<td>dir<\/td>\n<td>&#8220;h&#8221;<\/td>\n<td>The direction of tabs appearance. Possible values are <code>h<\/code> (horizontal) and <code>v<\/code> (vertical).<\/td>\n<\/tr>\n<tr>\n<td>space<\/td>\n<td>10<\/td>\n<td>The space between tabs points in pixels.<\/td>\n<\/tr>\n<tr>\n<td>width<\/td>\n<td>100<\/td>\n<td>Tab width in pixels.<\/td>\n<\/tr>\n<tr>\n<td>height<\/td>\n<td>100<\/td>\n<td>Tab height in pixels.<\/td>\n<\/tr>\n<tr>\n<td>align<\/td>\n<td>&#8216;bottom&#8217;<\/td>\n<td>Specifies how the control aligns within the slider.<\/td>\n<\/tr>\n<tr>\n<td>insertInfo<\/td>\n<td>true<\/td>\n<td>Whether it adds slide info in tab or not.<\/td>\n<\/tr>\n<tr>\n<td>insertTitle<\/td>\n<td>true<\/td>\n<td>Whether it adds slide title in the tab or not.<\/td>\n<\/tr>\n<tr>\n<td>insertThumb<\/td>\n<td>false<\/td>\n<td>Whether it adds slide thumb in the tab or not.<\/td>\n<\/tr>\n<tr>\n<td>wheel<\/td>\n<td>false<\/td>\n<td>Enables the scrolling through tabs by mouse wheel.<\/td>\n<\/tr>\n<tr>\n<td>wheelScrollSlick<\/td>\n<td>50<\/td>\n<td>The speed of wheel when it scrolls to a new position. 0 disables the slick effect.<\/td>\n<\/tr>\n<tr>\n<td>wheelSpeed<\/td>\n<td>2<\/td>\n<td>Wheel scrolling speed.<\/td>\n<\/tr>\n<tr>\n<td>wheelBounce<\/td>\n<td>false<\/td>\n<td>Whether it bounces on the edges by wheel or not.<\/td>\n<\/tr>\n<tr>\n<td>arrows<\/td>\n<td>false<\/td>\n<td>Whether it adds arrow element over the thumblist or not.<\/td>\n<\/tr>\n<tr>\n<td>speed<\/td>\n<td>17<\/td>\n<td>Specifies the speed of scrolling between list items.<\/td>\n<\/tr>\n<tr>\n<td>scroll<\/td>\n<td>true<\/td>\n<td>Whether to scroll between thumbs or not.<\/td>\n<\/tr>\n<tr>\n<td>swipe<\/td>\n<td>true<\/td>\n<td>Enables the swipe gesture navigation.<\/td>\n<\/tr>\n<tr>\n<td>fitMode<\/td>\n<td>null<\/td>\n<td>The fit mode of tabs, possible values are <code>fill<\/code>, <code>contain<\/code>, <code>cover<\/code>, <code>none<\/code> and <code>scale-down<\/code>.<\/td>\n<\/tr>\n<tr>\n<td>customClass<\/td>\n<td>null<\/td>\n<td>Adds a custom class name to the control element.<\/td>\n<\/tr>\n<tr>\n<td>insertTo<\/td>\n<td>null<\/td>\n<td>The custom location in the DOM tree to add the control element. Possible value is any CSS selector string.<\/td>\n<\/tr>\n<tr>\n<td>inset<\/td>\n<td>false<\/td>\n<td>Whether to insert the control inside view container or not.<\/td>\n<\/tr>\n<tr>\n<td>margin<\/td>\n<td>10<\/td>\n<td>Specifies the space amount between the control and slider&#8217;s side.<\/td>\n<\/tr>\n<tr>\n<td>hideOn<\/td>\n<td>null<\/td>\n<td>Hides the control on a the specified breakpoint or smaller than the given window width amount in pixels.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Defining tab<\/h2>\n<p>To set tabs for a slide you need to add the tab contents as child element of slide element. For more information check out <a href=\"https:\/\/env.averta.net\/en\/step\/adding-data\/?b=51926,51926\" title=\"Adding Data\">Slide data<\/a> article.<\/p>\n","type":"solution"}