Reputation: 2499
I want to use the Slider Component provided by @material-ui/core in my react project, but if I import the Slider like so: import Slider from 'import Slider from '@material-ui/lab/Slider';
it does throw me the error Module not found: Error: Can't resolve 'import Slider from '@material-ui/lab/Slider';
.
I am using "@material-ui/core": "^3.9.3"
. Also looking in my node_modules package there is no slider comp.
Does any of you know what kind of extra dep. I need to install/use?
Upvotes: 2
Views: 1211
Reputation: 38
I think you should update the version to v4.0 or above to import as import Slider from '@material-ui/core/Slider';
or you can import like this:import Slider from '@material-ui/lab/Slider';
in v3.9.3 to use Slider
this caused because of Slider added to core directory after v4.0
Upvotes: 2
Reputation: 106
in my opinion there is no slider in version 3 of material-ui. You have to use version 4+ ;-)
Upvotes: 0