A simple framer-motion-carousel
import * as React from "react";
import Carousel from "framer-motion-carousel";
const colors = ["#f90", "#ef0", "#e0f"];
const App = () => (
<div style={{ width: 600, height: 400 }}>
<Carousel>
{colors.map((item, i) => (
<div
key={i}
style={{
width: "100%",
height: "100%",
backgroundColor: colors[i],
}}
></div>
))}
</Carousel>
</div>
);
export default App;renderArrowLeft: ({handlePrev, activeIndex}) => React.ReactNode
renderArrowRight: ({handleNext, activeIndex}) => React.ReactNode
const App = () => (
<Carousel renderArrowLeft={({handlePrev, activeIndex}) => <div />}>
...
</Carousel>
)- dots
- custom dots
yarn install
yarn build
