A simple and lightweight react slider for viewing pictures
โ Install with npm โ
npm install mantra-slider
โ Install with yarn โ
yarn add mantra-slider
import { MantraImage, MantraSlider } from "mantra-slider";
<MantraSlider
keyExtractor={(item: any) => item.src}
hasControllers={false}
renderItem={({ src }, index) => {
return (
<MantraImage key={index} index={index}>
<img
loading="lazy"
alt={`${variant.name} image ${index}`}
src={src}
/>
</MantraImage>
);
}}
data={data}
/>
โ
git clone https://github.com/aldovandus/react-pictures-viewer
cd react-pictures-viewer
yarn install
yarn dev