-
Notifications
You must be signed in to change notification settings - Fork 160
Slider Specification
Aleksandar Kamenov edited this page Apr 9, 2019
·
86 revisions
The Slider component allows selection in a given range by moving the thumb along the track. The track can be defined as continuous or stepped and you can choose between SINGLE and RANGE slider types.
As a developer I would like to:
- be able to provide an array of strings that the slider could spread and visualize as labels of the thumbs.
<igx-slider [stepLabels]="['spring', 'autumn', 'winter', 'summer']">
</igx-slider>
- be able to change the type of the slider as a single or range.
<igx-slider [stepLabels]="['spring', 'autumn', 'winter', 'summer']" [type]="sliderType">
</igx-slider>
- be able to track the changes of the values per every slide.
- have the ability to manipulate the slider values through two way data binding.
- have a continuous and discontinued(stepped) representation of the slider.
<igx-slider [isContinuous]="true">
</igx-slider>
- be able to set a minimum and maximum values representing the beginning and end of a number sequence.
[begin....end]
<igx-slider [minValue]="20" [maxValue]="80">
</igx-slider>
- have the ability to set boundaries, limiting the sliding range in a given sequence of numbers.
[begin..lowerBound.......upperBound...end]
<igx-slider [lowerBound]="30" [upperBound]="70">
</igx-slider>
- be able to prevent user from interacting with the slider through the UI.
- have the ability the set the visibility duration of the thumb label that shows the slider value.
- have the ability to manipulate the sliding step.
- be able to manipulate the positioning of the slider pins(thumbs) through the API.
As end user I would like to:
- be able to pass an array of values represented by the thumbs of the slider.
- be able to navigate through the slider by dragging the pins.
- be able to change the positioning of the pins through the API.
- Have a slider that represents a sequence of numbers [1...n]
- Have a slider that allows smooth navigation with mouse drag.
- Have the ability to put boundaries for sliding and rendering.
- Have a slider that shows the values we are navigating through.
Describe behavior, design, look and feel of the implemented feature. Always include visual mock-up
3.1. End User Experience
3.2. Developer Experience
3.3. Globalization/Localization
Describe any special localization requirements such as the number of localizable strings, regional formats
3.4. User Interface
Include a diagram linking the elements with the visual representation of the feature
3.5. Navigation
3.6. API
Name | Description |
---|---|
SLIDER | Slider with single thumb. |
RANGE | Range slider with multiple thumbs, that can mark the range. |
Name | Type | Description |
---|---|---|
lower | number | The lower value of the range slider |
upper | number | The upper value of the range slider |
Name | Type | Description |
---|---|---|
oldValue | number | string | IRangeSliderValue | IRangeSliderValueLabel | Previous value of the slider |
new | number | string | IRangeSliderValue | IRangeSliderValueLabel | Current value of the slider |
Name | Description | Type | Default value |
---|---|---|---|
id | Unique identifier of the component. If not provided it will be automatically generated. | string | igx-slider-0 |
disabled | Disables or enables UI interaction. | boolean | false |
isContinuous | Marks slider as continuous. By default is considered that the slider is discrete. Discrete slider does not have ticks and does not shows bubble labels for values. | boolean | false |
lowerBound | The lower boundary of the slider value. If not set is the same as min value. | number | 0 |
upperBound | The lower boundary of the slider value. If not set is the same as max value. | number | 100 |
minValue | The minimum value for the slider. | number | 0 |
maxValue | The maximal value for the slider. | number | 100 |
step | The incremental/decremental step of the value when dragging the thumb. The step should be greater than 0. | number | 1 |
thumbLabelVisibilityDuration | The duration visibility of thumbs labels. | number | 750 ms |
type | Sets the SliderType, which is SLIDER or RANGE. | SliderType | SLIDER |
value | The slider value. If the slider is of type SLIDER the argument is number. By default if no value is set the default value is same as lower upper bound. If the slider type is RANGE then the argument is object containing lower and upper properties for the values. By default if no value is set the default value is for lower value it is the same as lower bound and if no value is set for the upper value it is the same as the upper bound. | number|IRangeSliderValue | |
Name | Description | Return type | Parameters |
---|---|---|---|
Name | Description | Cancelable | Parameters |
---|---|---|---|
onValueChange | This event is emitted when user has stopped interacting with the thumb and value is changed. | no | ISliderValueChangeEventArgs |
Specify only if applicable
Assumptions | Limitation Notes |
---|---|
Specify all referenced external sources