{"title":"Customizing Slider Layouts","id":51987,"link":"https:\/\/env.averta.net\/en\/step\/customizing-slider-layouts\/","parent":[51847],"content":"<p>Here you can find out how to control the slider layout and find what layout types are supported.<\/p>\n<h2>Boxed layout<\/h2>\n<p><code>layout:'boxed'<\/code><\/p>\n<p>The default slider layout is <code>boxed<\/code>. This layout type sizes the slider based on the <code>width<\/code> and <code>height<\/code> slider options.<\/p>\n<h2>Fullwidth layout<\/h2>\n<p><code>layout:'fullwidth'<\/code><\/p>\n<p>Fullwidth layout slider always fills the browser horizontal space whether slider locates inside a wrapper or not.<\/p>\n<h2>Fullscreen layout<\/h2>\n<p><code>layout:'fullscreen'<\/code><\/p>\n<p>This layout fills entire browser viewport. You may need to reserve some space on the top or bottom of the slider by <code>fullscreenMargin<\/code> slider option. For example <code>fullscreenMargin: 100<\/code> decreases slider height to add 100px horizontal space. This option is useful when you have another section in the page like menu bar and you want it to appear above the slider in fullscreen layout.<\/p>\n<h2>Autofill layout<\/h2>\n<p><code>layout:'autofill'<\/code><\/p>\n<p>Slider fills another element in the page. The default target element is the slider&#8217;s parent element, but you can change the target element by <code>autofillTarget<\/code>. To change the target element, you can set any CSS selector as the <code>autofillTarget<\/code> option value.<\/p>\n<h2>Partial view<\/h2>\n<p><code>partialView:true<\/code><\/p>\n<p>Enables the partial view layout. You can enable this option with any other slider layout. It shows other slides before and after the current slide. Also, you can set minimum size of area where the side of the slides are visible by <code>partialMinSpace<\/code> in pixels. It reserves the space in small screen sizes.<\/p>\n<p class=\"aswi-text-box box-note\"><strong>Note: <\/strong>This option is added by <code>partialView<\/code> addon. Make sure the slider script package contains this addon. For more info check out <a href=\"https:\/\/env.averta.net\/en\/step\/customizing-slider-layouts\/?b=,\" title=\"Customizing Slider Layouts\">Building slider script<\/a> article.<\/p>\n<h2>Other slider layout options<\/h2>\n<p>Here you can find the list of other slider layout options<\/p>\n<table>\n<thead>\n<tr>\n<td>Option name<\/td>\n<td>Default value<\/td>\n<td>Description<\/td>\n<td>Related addon<\/td>\n<\/tr>\n<\/thead>\n<tbody><!-- Layout --><\/p>\n<tr>\n<td>width<\/td>\n<td>300<\/td>\n<td>The slider width and the slides content wrapper width. It is also effective<br \/>\nin calculating the slider aspect ratio.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>height<\/td>\n<td>150<\/td>\n<td>The slider height. An object value specifies the slider height at every specific<br \/>\nbreak points. For more information check out <a href=\"https:\/\/env.averta.net\/en\/step\/controlling-slider-height\/?b=51992,51992\" title=\"Controlling Slider Height\">controlling&lt;br \/&gt;\nslider height<\/a> article.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>breakpoints<\/td>\n<td>Breakpoints object<\/td>\n<td>This option defines breakpoints for the slider. For more information check out<br \/>\n<a href=\"https:\/\/env.averta.net\/en\/step\/customizing-slider-layouts\/?b=,\" title=\"Customizing Slider Layouts\">Breakpoints<\/a> article.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>keepAspectRatio<\/td>\n<td>true<\/td>\n<td>Keeps the slider aspect ratio on resize.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>narrowLayoutOn<\/td>\n<td>&#8216;tablet&#8217;<\/td>\n<td>It gets a breakpoint name, so it will determine in what devices, the slider layout switches to narrow size. For more information about responsiveness and layout check out <a href=\"https:\/\/env.averta.net\/en\/step\/defining-breakpoints\/?b=51990,51990\" title=\"Defining Breakpoints\">Breakpoints<\/a> article.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>minHeight<\/td>\n<td>0<\/td>\n<td>Specifies min height value of the slider. It prevents slider to shows too narrow<br \/>\nin small screens.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>maxHeight<\/td>\n<td>0<\/td>\n<td>Specifies max height value of the slider.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>heightLimit<\/td>\n<td>true<\/td>\n<td>Prevents the slider height gets taller than the specified height option value.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<p><!-- auto height addon --><\/p>\n<tr>\n<td>autoHeight<\/td>\n<td>false<\/td>\n<td>Automatically changes the slider height to fill the selected slide. Enabling<br \/>\nthis option overrides all other height sizing options.<\/td>\n<td>autoHeight<\/td>\n<\/tr>\n<tr>\n<td>smoothHeight<\/td>\n<td>true<\/td>\n<td>Enables smooth height change that only works if<br \/>\n<strong>autoHeight<\/strong> is enabled.<\/td>\n<td>autoHeight<\/td>\n<\/tr>\n<tr>\n<td>smoothHeightDuration<\/td>\n<td>0.5<\/td>\n<td>The transition duration of changing slider height in seconds. Only works<br \/>\nif?<strong>autoHeight<\/strong> and?<strong>smoothHeight<\/strong> are enabled.<\/td>\n<td>autoHeight<\/td>\n<\/tr>\n<tr>\n<td>smoothHeightEase<\/td>\n<td>Power3.easeInOut<\/td>\n<td>The smooth height transition easing function. You can find available easing<br \/>\nfunctions in <a href=\"https:\/\/env.averta.net\/en\/step\/adding-easing-functions\/?b=51985,51985\" title=\"Adding Easing Functions\">this article.<\/a><\/td>\n<td>autoHeight<\/td>\n<\/tr>\n<p><!-- partialView addon --><\/p>\n<tr>\n<td>partialView<\/td>\n<td>false<\/td>\n<td>Shows partial of next and previous slides at both sides of the selected slide.<\/td>\n<td>partialView<\/td>\n<\/tr>\n<tr>\n<td>partialMinSpace<\/td>\n<td>30<\/td>\n<td>The minimum space of both sides from the slider in small screen sizes<br \/>\nwhen partial view option is enabled.<\/td>\n<td>partialView<\/td>\n<\/tr>\n<tr>\n<td>sizingReference<\/td>\n<td>&#8216;view&#8217;<\/td>\n<td>This option lets you set how slider finds the breakpoint, whether relative to the window, or where the slider is located in the page. Possible values are <code>window<\/code> and <code>view<\/code>. View value refers to the slides area size.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>breakPointClass<\/td>\n<td>true<\/td>\n<td>Adds breakpoints helper class names to the slider element.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>overflowFix<\/td>\n<td>true<\/td>\n<td>Fixes the unexpected page horizontal scroll in fullscreen layout.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>centerControls<\/td>\n<td>true<\/td>\n<td>Aligns slider UI control to center. It is affective with fullwidth or fullscreen<br \/>\nlayout.<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","type":"solution"}