1.0.8 • Published 4 years ago

@aiherrera/react-slider v1.0.8

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

Slider for React

A simple and easy to use react slider

Installation

Requires React 16 or later

npm i --save @aiherrera/react-slider

# or

yarn add @aiherrera/react-slider

Demo

You can check all the configurations in this Ai-CoderLab

Usage

{ Slider }

// ES5 syntax
const Slider = require('@aiherrera/react-slider')

// ES6 syntax
import Slider from '@aiherrera/react-slider'

Full example

import React from 'react'

import Slider from '@aiherrera/react-slider'

const App = () => {
  const manualColor = '#7474e7'
  const vertical = false
  const timing = 3000
  const images = []
  const showText = false
  const paragraph =
    'Lorem ipsum dolor sit amet consectetur adipisicing elit. Neque ut eveniet ad exercitationem, ducimus mollitia alias debitis magnam atque animi illo officiis eum numquam iure suscipit, iste nisi. Excepturi, rem!'
  const textColor = '#F1EAEA'
  const backgroundColor = '#4949D8'

  return (
    <>
      <Slider
        color={manualColor}
        textColor={textColor}
        backgroundColor={backgroundColor}
        timing={timing}
        showText={showText}
        paragraph={paragraph}
        vertical={vertical}
        images={images}
      />
    </>
  )
}

Props

All these props are passed as defaults and can be overriden any time.

NameTypeUnitDescriptionDefault
colorstringN/AManual navigation color#7474e7
textColorstringN/AParagraph color#F1EAEA
backgroundColorstringN/AParagraph background color#4949D8
timingnumberN/ATime in ms of slides transition3000ms
showTextbooleanN/AWether or not to show the paragraphfalse
paragraphstringN/AThe text of the paragraph''
verticalbooleanN/ASwitches the manual navigation vertical/horizontalfalse
imagesarrayN/AA collection of images for the slides[]
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.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago