Orientation
27 Oct 20171 minute to read
This property is used to set the Slider in either horizontal or vertical direction. By default, Slider renders in horizontal direction. Data type of this property is “enum”.
Possible Slider orientations are as follows,
Property Table for JavaScript
Property | Allowed values | Description |
---|---|---|
orientation | ej.Orientation.Vertical | Displays the Slider in vertical direction |
ej.Orientation.Horizontal (default value) | Displays the Slider in horizontal direction |
The following steps explains you on how to configure the orientation property.
In an HTML page, add a <div> element to render it as a Slider widget.
<ej-slider id='rangeSlider' [height]='height' [width]='width' [values]='slidevalue' [orientation]='orientation'></ej-slider>
<script>
import { Component } from '@angular/core';
import { SliderModule } from '@syncfusion/ej2-ng-inputs';
@Component({
selector: 'control-content',
templateUrl: 'app/components/slider/slider.component.html'',
})
export class DefaultSliderComponent {
public slideValue: number = 60;
public height: number = 16;
public width: number = 150;
public orientation:'vertical';
}
</script>
Execute the above code example to render the following output.