Components and their props
Slider
disabled true/false
Tells if the slider is disabled.
min number
Tells minimum value of the slider.
max number
Tells maximum value of the slider.
step number
Tells step/jump of the slider.
value number
Tells current value of the slider.
discrete true/false
Tells if the slider is discrete.
Sample code
import {h, Component} from 'preact';
import Slider from 'preact-material-components/Slider';
import 'preact-material-components/Slider/style.css';
export default class SnackbarPage extends Component {
render(){
return (
<div>
<Slider step={2} value={10} max={20}/>
</div>
);
}
}
Original documentation
This component encapsulates
mdc-slider, you can refer to its documentation
here.
Demo
Regular
Disabled
Step 2, Max 20, Value 10
Discrete