Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
311 views
in Technique[技术] by (71.8m points)

reactjs - React slick with custom scrollbar navigation

I am trying to build custom scrollbar navigation for the react-slick carousel item. React-slick already provides dot navigation but that is not what I am looking for. I want to build something like what amazon has on their homepage for showcasing products. Can someone please help me with the logic for building and binding it to the carousel item.

Amazon Slider Amazon Slider

For Reference: Slider I am building

I am currently trying to do it with react-slick but if there is any other library that can do it better then I will gladly do so.

import React from "react";
import Carousel, { Settings } from "react-slick";
import "slick-carousel/slick/slick.css";
const VariatedCarousel = () => {
  const settings: Settings = {
    infinite: false,
    slidesToScroll: 3,
    slidesToShow: 3,
  };

  return (
    <div className="container">
      <Carousel {...settings} className="first">
        <div className="item">1</div>
        <div className="item">2</div>
        <div className="item">3</div>
        <div className="item">4</div>
        <div className="item">5</div>
      </Carousel>
      <div className="scroller">
          <span className="thumb"></span>
      </div>
    </div>
  );
};

export default VariatedCarousel;
question from:https://stackoverflow.com/questions/65897916/react-slick-with-custom-scrollbar-navigation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...