rcaferati / react-awesome-slider

React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. 🖥️ 📱
https://fullpage.caferati.me
MIT License
2.92k stars 294 forks source link

How to display organicArrows on mobile view ? #201

Open 007AMAN007 opened 2 years ago

007AMAN007 commented 2 years ago

I just started using this package today, I want to know how to display organicArrows on mobile view. I am using organicArrows={true}

I know on mobile view by default arrows visibility is hidden, how I can change it's visibility ?

trolit commented 2 years ago

One way I can think of is adjusting slider styles within scss file.

First, follow steps to configure your own scss file for that slider: https://github.com/rcaferati/react-awesome-slider/issues/147#issuecomment-706706461

Second, find that part:

    @media all and (max-width: 520px) {
      visibility: hidden;
    }

and remove visibility: hidden

voilà:

preview1

bonus:

You will probably want to adjust them to your needs. Just get back to part mentioned above and play with styles like how animation behaves, arrow size. Here's example on how to reduce their size.

@media all and (max-width: 520px) {
      &__arrow-left,  {
        height: 20px !important;
        margin-left: 20px;
      }

      &__arrow-right {
        height: 20px !important;
        margin-right: 20px;
      }
    }

result:

preview2
007AMAN007 commented 2 years ago

Thank You @trolit ; Awesome it's working very fine.