| Name | Type | Default |
|
buttonsPosition
# |
SliderButtonsPosition
|
both
|
SliderButtonsPosition: "both" | "left" | "right"
Sets or gets scroll buttons position.
Possible Values:
'both'
'left'
'right'
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} buttonsPosition={'left'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
disabled
# |
boolean
|
false
|
Sets or gets whether the slider is disabled.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} disabled={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
height
# |
string | number
|
35
|
Sets or gets the slider's height.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
layout
# |
SliderLayout
|
"normal"
|
SliderLayout: "normal" | "reverse"
Sets or gets the slider's layout.
Possible Values:
'normal'
'reverse'-the slider is filled from right-to-left(horizontal slider) and from top-to-bottom(vertical slider)
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} layout={'reverse'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
mode
# |
SliderMode
|
default
|
SliderMode: "default" | "fixed"
Sets or gets slider's mode.
Possible Values:
'default'- the slider's thumb can be dragged smoothly ( like a scrollbar )
'fixed'- the thumb is dragged with a 'step' specified by the 'step' property.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} mode={'fixed'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
minorTicksFrequency
# |
number
|
1
|
Sets or gets slider's minor ticks frequency.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showMinorTicks={true} minorTicksFrequency={1} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
minorTickSize
# |
number
|
4
|
Sets or gets slider's minor ticks size.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return (
<JqxSlider
ref={mySlider}
height={100}
showMinorTicks={true}
minorTicksFrequency={1}
minorTickSize={10}
/>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
max
# |
number
|
10
|
Sets or gets slider's maximum value.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} max={30} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
min
# |
number
|
0
|
Sets or gets slider's minimum value.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} min={5} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
orientation
# |
string
|
'horizontal'
|
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} orientation={'vertical'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
rangeSlider
# |
boolean
|
false
|
Sets or gets whether the slider is displayed as a range slider and has 2 thumbs. This allows the user to select a range of values. By default, end-users can select only a single value.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} rangeSlider={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
rtl
# |
boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} rtl={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
step
# |
number
|
1
|
Sets or gets the slider's step when the user is using the keyboard arrows, slider increment and decrement buttons or the mouse wheel for changing the slider's value.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} step={3} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showTicks
# |
boolean
|
true
|
Sets or gets whether ticks will be shown.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showTicks={false} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showMinorTicks
# |
boolean
|
false
|
Sets or gets whether minor ticks will be shown.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showMinorTicks={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showTickLabels
# |
boolean
|
false
|
Sets or gets whether major tick labels will be shown.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showTickLabels={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showButtons
# |
boolean
|
true
|
Sets or gets whether the scroll buttons will be shown.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showButtons={false} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showRange
# |
boolean
|
true
|
Sets or gets whether the slider range background is displayed. This is the fill between the slider's left button and the slider's thumb to indicate the selected value. In range slider mode, the space between the handles is filled to indicate the selected values.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} showRange={false} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
template
# |
SliderTemplate
|
'default'
|
SliderTemplate: "default" | "primary" | "success" | "warning" | "danger" | "info"
Determines the template as an alternative of the default styles.
Possible Values:
'default' - the default template. The style depends only on the "theme" property value.
'primary' - dark blue style for extra visual weight.
'success' - green style for successful or positive action.
'warning' - orange style which indicates caution.
'danger' - red style which indicates a dangerous or negative action.
'info' - blue button, not tied to a semantic action or use.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} template={'success'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
theme
# |
string
|
''
|
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} theme={'material'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
ticksPosition
# |
SliderTicksPosition
|
both
|
SliderTicksPosition: "top" | "bottom" | "both"
Sets or gets slider's ticks position.
Possible Values:
'top'
'bottom'
'both'
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} ticksPosition={'bottom'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
ticksFrequency
# |
number
|
2
|
Sets or gets slider's major ticks frequency.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} ticksFrequency={1} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tickSize
# |
number
|
7
|
Sets or gets slider's major ticks size.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} tickSize={10} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tickLabelFormatFunction
# |
(value: SliderTickLabelFormatFunction['value']) => string
|
null
|
Interface SliderTickLabelFormatFunction { value?: number; }
Sets or gets the major ticks labels formatting function.
import { createRoot } from 'react-dom/client';
import { useMemo, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider, { type ISliderProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const tickLabelFormatFunction = useMemo<ISliderProps['tickLabelFormatFunction']>(
() =>
(value: number): any => {
return value;
},
[]
);
return (
<JqxSlider
ref={mySlider}
height={100}
tickLabelFormatFunction={tickLabelFormatFunction}
showTickLabels={true}
/>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tooltip
# |
boolean
|
false
|
Sets or gets whether the slider tooltip will be shown.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} tooltip={true} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tooltipHideDelay
# |
number
|
500
|
Sets or gets the tooltip's hide delay.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} tooltip={true} tooltipHideDelay={2000} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tooltipPosition
# |
SliderTooltipPosition
|
"near"
|
SliderTooltipPosition: "near" | "far"
Sets or gets the tooltip's position. Possible values: "near", "far"
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} tooltip={true} tooltipPosition={'far'} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
tooltipFormatFunction
# |
(value: SliderTooltipFormatFunction['value']) => any
|
null
|
Interface SliderTooltipFormatFunction { value?: number; }
Sets or gets the tooltip's tooltip formatting.
import { createRoot } from 'react-dom/client';
import { useMemo, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider, { type ISliderProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const tooltipFormatFunction = useMemo<ISliderProps['tooltipFormatFunction']>(
() =>
(value: number): any => {
return value.toPrecision(2);
},
[]
);
return (
<JqxSlider
ref={mySlider}
height={100}
tooltipFormatFunction={tooltipFormatFunction}
tooltip={true}
/>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
value
# |
any
|
0
|
Sets or gets slider's value. This property will be an object with the following structure { rangeStart: range_start, rangeEnd: range_end } if the slider is range slider otherwise it's going to be a number.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} value={5} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
values
# |
Array<number>
|
[0, 10]
|
Sets or gets range slider's values.The 'rangeSlider' property should be set to true.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} rangeSlider={true} values={[5, 15]} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
width
# |
number | string
|
300
|
Sets or gets the slider's width.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
return <JqxSlider ref={mySlider} height={100} width={300} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
|
change
# |
Event
|
|
This event is triggered when the value of the slider is changed.
Code examples #
Bind to the change event of jqxSlider.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const onChange = (_e: Event): void => {
alert('do something...');
};
return <JqxSlider ref={mySlider} onChange={onChange} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
slide
# |
Event
|
|
This event is triggered when the user is dragging the sliders thumb.
Code examples #
Bind to the slide event of jqxSlider.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const onSlide = (_e: Event): void => {
alert('do something...');
};
return <JqxSlider ref={mySlider} onSlide={onSlide} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
slideStart
# |
Event
|
|
This event is triggered when the user start dragging slider's thumb.
Code examples #
Bind to the slideStart event of jqxSlider.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const onSlideStart = (_e: Event): void => {
alert('do something...');
};
return <JqxSlider ref={mySlider} onSlideStart={onSlideStart} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
slideEnd
# |
Event
|
|
This event is triggered when the user have dragged the slider's thumb and drop it.
Code examples #
Bind to the slideEnd event of jqxSlider.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
const onSlideEnd = (_e: Event): void => {
alert('do something...');
};
return <JqxSlider ref={mySlider} onSlideEnd={onSlideEnd} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
| Name | Arguments | Return Type |
|
destroy
# |
None
|
|
Destroys the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.destroy();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
decrementValue
# |
None
|
|
Decreases the jqxSlider's value with the value of the 'step' property.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.decrementValue();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
disable
# |
None
|
|
Disabling the slider.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.disable();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
enable
# |
None
|
|
Enables the slider.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.enable();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
focus
# |
None
|
|
Focuses the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.focus();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
getValue
# |
None
|
|
Gets the slider's value. The returned value is a number or an object. If the Slider is a range slider, the method returns an object with the following fields: rangeStart - the range's start value and rangeEnd - the range's end value..
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.getValue();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
incrementValue
# |
None
|
|
Increases the jqxSlider's value with the value of the 'step' property.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.incrementValue();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
setValue
# |
index
|
|
Sets the jqxSlider's value. When the slider is not in range slider mode, the required parameter for the value is a number which should be in the 'min' - 'max' range. Possible value types in range slider mode- array, object or two numbers.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.setValue(5);
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
val
# |
value
|
|
Sets or gets the value.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider';
function App() {
const mySlider = useRef<JqxSlider>(null);
useEffect(() => {
mySlider.current!.val();
}, []);
return <JqxSlider ref={mySlider} height={100} />;
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|