1.0.7 • Published 1 year ago
@nicecaroujs/react v1.0.7
Carousel Library(beta)
A simple and customizable carousel library for React. This component allows you to display items dynamically with flexible configuration options.
Installation
To use this library, you need to install it first. You can do this via npm or yarn:
npm install @nice-caroujs/reactBasic configuration for exampls
import { NcContainer, NcSlide, NcWrapper } from ' @nice-caroujs/react'
import "@nicecaroujs/react/dist/cjs/nice-carou.css"
import React from 'react'
const CarouselComponent = ({ tab }) => {
const options = {
width: "100%",
height: "15rem",
containerRadius: "0.5rem",
slideRadius: "0.5rem",
theme: "light",
itemsPerPage: 4,
breakpoints: {
desktop: {
itemsPerPage: 4,
},
tablet: {
itemsPerPage: 2,
},
phone: {
itemsPerPage: 1,
}
},
bgGradientAnimated: false,
arrows: {
position: "inside",
shake: true,
type: "chevron"
},
pagination: {
position: "outside",
enabled: true,
wrap: true
}
};
return (
<NcContainer aria-label='carousel test' options={options}>
<NcWrapper className="w-36">
<NcSlide key={1}>
<div className='h-full w-full flex justify-center items-center gradientSlide'>
<img src={img1} alt={"image 1"} className="object-cover h-full w-full rounded" />
</div>
</NcSlide>
<NcSlide key={2}>
<div className='h-full w-full flex justify-center items-center gradientSlide'>
<img src={img2} alt={"image 2"} className="object-cover h-full w-full rounded" />
</div>
</NcSlide>
<NcSlide key={3}>
<div className='h-full w-full flex justify-center items-center gradientSlide'>
<img src={img3} alt={"image 3"} className="object-cover h-full w-full rounded" />
</div>
</NcSlide>
</NcWrapper>
</NcContainer>
);
};
export default CarouselComponent;for more about nice-carou clique here :
1.0.7-beta.1
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5-beta.1
1 year ago
1.0.5
1 year ago
1.0.4-beta.3
1 year ago
1.0.4-beta.2
1 year ago
1.0.4-beta.1
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago