<!DOCTYPE html><html><head><title>Slider Overview</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><divclass="slider-container"><spanclass="slider-label">Slider</span><igc-slidervalue="40"></igc-slider></div><divclass="slider-container"><spanclass="slider-label">Range Slider</span><igc-range-sliderlower="20"upper="70"></igc-range-slider></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Slider 구성 요소와 Range Slider 구성 요소의 주요 차이점은 Slider 구성 요소에는 엄지 손가락이 하나 있고 Range Slider 구성 요소에는 엄지 손가락이 두 개 있다는 것입니다. Slider 구성 요소의 단일 썸은 해당 value 속성을 표시합니다. Range Slider 구성 요소의 두 엄지손가락에는 lower 및 upper 속성이 표시됩니다.
두 슬라이더 모두 값 중 하나라도 변경될 때 두 개의 이벤트를 발생시킵니다. IgcInputComponent이 이벤트는 키보드 또는 드래그 상호 작용을 사용하여 값이 변경될 때마다 발생하며, Change 드래그 끝 또는 키보드 상호 작용에서 값 변경이 커밋될 때 이벤트가 발생합니다.
<!DOCTYPE html><html><head><title>Slider Value</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-slidervalue="40"></igc-slider><divclass="value-container"><spanclass="slider-label">Value: </span><spanid="slider-value">40</span></div><igc-range-sliderlower="20"upper="70"></igc-range-slider><divclass="value-container"><spanclass="slider-label">Lower: </span><spanid="slider-lower">20</span><spanclass="slider-label">, Upper: </span><spanid="slider-upper">70</span></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
<!DOCTYPE html><html><head><title>Slider Disabled</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-slidervalue="40"disabled></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
igc-slider {
padding: 30px30px0px30px;
}css
제약
슬라이더의 트랙에는 min 및 max 속성을 사용하여 구성되는 최소값과 최대값이 있습니다. 또한 lowerBound 및 upperBound 속성을 사용하여 썸 드래그를 제한할 수 있습니다.
<!DOCTYPE html><html><head><title>Slider Constraints</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-slidermax="1000"min="100"lower-bound="200"upper-bound="800"value="400"primary-ticks="2"
></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
igc-slider {
padding: 30px30px0px30px;
}css
단계
step 속성은 값이 준수해야 하는 슬라이더의 세분성을 지정합니다. 기본적으로 슬라이더 트랙은 연속적으로 보입니다. 슬라이더의 discreteTrack 속성을 true로 설정하면 트랙에 단계가 표시됩니다.
EXAMPLE
step 속성이 0으로 설정되면 단계별 실행이 암시되지 않으며 슬라이더 범위의 모든 값이 허용됩니다. 이 경우, discreteTrack true로 설정되어 있어도 슬라이더는 연속적으로 보입니다.
눈금 표시
슬라이더 구성 요소에는 눈금 표시와 레이블이 표시될 수 있습니다. 슬라이더 구성 요소는 기본 및 보조라는 두 가지 유형의 눈금 표시를 지원합니다. 기본 눈금 표시를 표시하려면 primaryTicks 속성을 1 보다 큰 값으로 설정해야 합니다. 기본 틱 수는 트랙에 고르게 분포됩니다. 보조 눈금 표시를 표시하려면 secondaryTicks 속성을 0 보다 큰 값으로 설정해야 합니다. secondaryTicks 값은 두 개의 기본 틱 사이의 보조 틱 수를 지정합니다.
<!DOCTYPE html><html><head><title>Slider Tick Marks</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-sliderprimary-ticks="3"secondary-ticks="4"
></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
igc-slider {
padding: 30px30px0px30px;
}css
또한, tickOrientation 속성을 사용하여 눈금 표시의 방향을 구성할 수 있습니다. 기본적으로 tickOrientation 값은 슬라이더 트랙 아래에 틱을 표시하는 end 입니다. 트랙 위에 표시되는 start과 트랙 위와 아래의 틱을 미러링하는 mirror 설정할 수 있습니다.
기본적으로 눈금 표시에는 해당 값과 함께 레이블이 표시됩니다. 속성을 사용하여 눈금 레이블의 회전을 수정할 수 있습니다 SliderTickLabelRotation. 또한 and hideSecondaryLabels 속성을 사용하여 기본 및 보조 눈금의 레이블을 숨길 수 있습니다 hidePrimaryLabels.
<!DOCTYPE html><html><head><title>Slider Tick Labels</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-sliderprimary-ticks="6"secondary-ticks="1"tick-orientation="mirror"tick-label-rotation="-90"hide-secondary-labels
></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
<!DOCTYPE html><html><head><title>Slider Value Format</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-sliderid="slider1"primary-ticks="3"secondary-ticks="4"
></igc-slider><igc-sliderid="slider2"value-format="Storage: {0} GB"
></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
igc-slider {
padding: 30px50px;
}css
레이블
어떤 경우에는 슬라이더 값을 문자열 값으로 형식화하려는 경우가 있습니다. 즉, [0, 1, 2] 값을 ['Low', 'Medium', 'High']에 매핑합니다. 이 시나리오에서는 슬라이더를 사용하여 내부에 IgcSliderLabelComponent 요소를 정의할 수 있습니다. 슬라이더 레이블의 텍스트 내용은 썸 및 눈금 레이블에 사용됩니다. 슬라이더 레이블이 제공되면 제공된 레이블에 매핑되지 않는 값을 허용하지 않도록 min, max 및 step 속성이 자동으로 계산됩니다. 'Low', 'Medium', 'High' 라벨의 경우 min은 0, max는 2, step은 1로 설정됩니다.
<!DOCTYPE html><html><head><title>Slider Labels</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><igc-sliderprimary-ticks="3"><igc-slider-label>Low</igc-slider-label><igc-slider-label>Medium</igc-slider-label><igc-slider-label>High</igc-slider-label></igc-slider></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
<!DOCTYPE html><html><head><title>Slider Styling</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample center"><divclass="slider-container"><spanclass="slider-label">Slider</span><igc-slidervalue="40"></igc-slider></div><divclass="slider-container"><spanclass="slider-label">Range Slider</span><igc-range-sliderlower="20"upper="70"></igc-range-slider></div></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css