React-slick: Custom next/next arrows disabled

Created on 2 Aug 2016  路  3Comments  路  Source: akiran/react-slick

Hi, Do you know if there is a way to add the "slick-disabled" class in order to hide the Custom next/prev arrows? I need it for a responsive carousel.

Thanks

Most helpful comment

Worked like a charm, though I didn't see any other documentation about it. Also, I found that once I added className to the arrow component:

let NextArrow = ({ onClick, className}) => (
    <div className={className}>

I had to add (s)CSS to override the arrow color on hover:

.slick-arrow {
    &:hover i:before {
        color: $colorBlue!important; //otherwise it becomes white on hover...
    }
}

I guess it's just the default styling which I don't know another way to disable/override.

All 3 comments

the next/prev arrows are provided className props which include slick-disabled if it is disabled.

@blairanderson Ok I got it! Thank you

Worked like a charm, though I didn't see any other documentation about it. Also, I found that once I added className to the arrow component:

let NextArrow = ({ onClick, className}) => (
    <div className={className}>

I had to add (s)CSS to override the arrow color on hover:

.slick-arrow {
    &:hover i:before {
        color: $colorBlue!important; //otherwise it becomes white on hover...
    }
}

I guess it's just the default styling which I don't know another way to disable/override.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ramyatrouny picture ramyatrouny  路  3Comments

darkalor picture darkalor  路  4Comments

jfamousket picture jfamousket  路  3Comments

PolGuixe picture PolGuixe  路  3Comments

rohitgoyal7 picture rohitgoyal7  路  3Comments