1.0.23 • Published 3 years ago

react-clean-carousel v1.0.23

Weekly downloads
16
License
MIT
Repository
-
Last release
3 years ago

react-clean-carousel

A simple carousel component with navigation and formattable styling.

Usage

import {
  Carousel,
  Slide
} from 'react-clean-carousel'

import '../node_modules/react-clean-carousel/dist/main.css';
.
.
.
<Carousel>
  <Slide imageUrl="https://picsum.photos/900/400">
    children (whatever you want to put IN the slide e.g buttons, links, etc)
  </Slide>
</Carousel>

Properties (props with ? at the end are optional)

Carousel component

PropTypeDefaultDefinition
sizestring'large'Defines the size of the carousel. 'large' is the standard 1400px wide on a FullHD panel, while the others may be used for other use cases: 'medium-large', 'medium', 'small', 'verysmall', respectively.
childrenSlide[]undefinedThe slides that will be used in the carousel, each with their own props.
autoplay?booleantrueDefines if the carousel should loop through the slides automatically.
autoplayIntervalTime?number5000The time between each slide changing to the next, defined in miliseconds.
mainStyle?React.CSSPropertiesundefinedUsed to override the styling of the main container of the carousel, should you need it.
innerStyle?React.CSSPropertiesundefinedOverrides the styling of the inner container of the carousel, the one that contains the Slides as its children.
arrowsNav?booleantrueDefines if you want to have arrow navigation or not.
dotsNav?booleantrueDefines if you want navigation with dots or not.
arrowsContainerStyle?React.CSSPropertiesundefinedUsed to override the styling of the container of the navigation arrows, should you need to.
previousArrowStyle?React.CSSPropertiesundefinedOverride the style of the previous slide navigation arrow
nextArrowStyle?React.CSSPropertiesundefinedOverride the style of the next slide navigation arrow
dotsContainerStyle?React.CSSPropertiesundefinedUsed to override the styling of the navigation dots' container.
dotStyle?React.CSSPropertiesundefinedOverrides the styling of the individual dots.

Slide component

PropTypeDefaultDefinition
imageUrlstringundefinedThe url for the background image of that slide.
linkUrl?stringundefinedA url you can add if you want the whole image of the slide to be a link
childrenReact.ReactNode[]undefinedWhatever JSX children you may want to pass into that slide to have (links, buttons, etc.)
style?React.CSSPropertiesundefinedOverrides the styling for the Slide container.

License

MIT © markbayor

1.0.22

3 years ago

1.0.23

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18-b

3 years ago

1.0.18

3 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago