Search results

TicksData API in JavaScript Slider API control

Configures the ticks data of the Slider.

Properties

format

string

It is used to customize the Slider scale value to the desired format using Internationalization or events(custom formatting).

    <div id="default"></div>
    import { Slider } from "@syncfusion/ej2-inputs";
    let defaultObj: Slider = new Slider({
      value: 30,
      ticks: { placement: "After", format: "C2", largeStep: 20, smallStep: 10, showSmallTicks: true }
    });
    defaultObj.appendTo("#default");

largeStep

number

It is used to denote the distance between two major (large) ticks from the scale of the Slider.

    <div id="default"></div>
  import { Slider } from "@syncfusion/ej2-inputs";
  let defaultObj: Slider = new Slider({
    value: 30,
    ticks: { placement: "After", largeStep: 20}
  });
  defaultObj.appendTo("#default");

Defaults to 10

placement

Placement

It is used to denote the position of the ticks in the Slider. The available options are:

  • before - Ticks are placed in the top of the horizontal slider bar or at the left of the vertical slider bar.
  • after - Ticks are placed in the bottom of the horizontal slider bar or at the right of the vertical slider bar.
  • both - Ticks are placed on the both side of the Slider bar.
  • none - Ticks are not shown.
  <div id="default"></div>
  import { Slider } from "@syncfusion/ej2-inputs";
  let defaultObj: Slider = new Slider({
      // Set the value for slider
      value: 30,
      ticks: { placement: "After"}
    });
    defaultObj.appendTo("#default");

Defaults to ‘None’

showSmallTicks

boolean

We can show or hide the small ticks in the Slider, which will be appeared in between the largeTicks.

Defaults to false

smallStep

number

It is used to denote the distance between two minor (small) ticks from the scale of the Slider.

  <div id="default"></div>
  import { Slider } from "@syncfusion/ej2-inputs";
  let defaultObj: Slider = new Slider({
        // Set the value for slider
      value: 30,
      ticks: { placement: "After", smallStep: 10 }
    });
    defaultObj.appendTo("#default");

Defaults to 1