1.0.11 • Published 2 years ago

carefree-carousel v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

carefree-carousel

A click-based carousel (run it care-free).


npm.io

GitHub Workflow Status npm npm bundle size GitHub npm.io npm.io npm.io npm.io npm GitHub Repo stars


Installing

npm install carefree-carousel


Importing usage

  1. import Carousel from 'carefree-carousel';

  2. var Carousel = require('carefree-carousel');

    • If the above are not working or fitting your specific use-case try one of the other bundle versions by explicit import/require
    • (Example) import Carousel from 'carefree-carousel/dist/bundle.min.js'

Demo

https://user-images.githubusercontent.com/88824507/134108105-acd1dc0d-30f6-4e6f-a83a-71b97109b001.mov

This is how the parameters were loaded for the video above

<Carousel toggleDots={false} slideText={false} toggleNav={false} startIndex={0} delayTime={4000} />

The content array expects either a valid React element or a valid image string.

content={[<div>An element</div>, "a-image-link-here", "other-image-link", <p>a new element</p>]}

The navImg array expects two valid image strings in the following order

navImg={["image-for-left-arrow-here", "image-for-right-arrow-here"]}

Features

1) Preloading images 2) Transitioning effect between images 3) Error checking for correct types (Will display an error message)


Documentation

ParameterTypeDefault value(s)Trigger action
autoPlayboolfalseToggle On/Off auto-play between slides
contentarrayProvided 3 imagesAdd custom images or elements for each slide
delayTimeint3 secondsChange the time between each slide
navImgarrayOfStringsProvided 2 imagesAdd custom images for pagination arrows
slideTextbooltrueToggle displaying On/Off of current slide #
startIndexint0Choose which slide to begin playback on
toggleDotsboolfalseToggle displaying dots navigation On/Off
toggleNavbooltrueToggle displaying arrows navigation On/Off

Image references

Thank you to Unsplash for image hosting and individual contributors for uploading their images:


Badges

Thank you to shields.io for the templates they have provided.


Dependency authors

Thank you to all dependency library authors, make sure to check them out if you get the chance.


1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago