0.0.6 • Published 5 months ago

as-slider v0.0.6

Weekly downloads
6
License
MIT
Repository
github
Last release
5 months ago

as-slider

NPM JavaScript Style Guide

Install

npm install --save as-slider

Usage

import React, { Component } from 'react'
import { Slider, SliderSm, SingleProdSlider } from 'as-slider';
class Example extends Component {
  render () {
    return (
      <Slider dataSet={data} option={option} interval={4} wrapClassName={"newClass"} />

      <SliderSm dataSet={data} interval={4} charLimit={100} wrapClassName={"customClass"} />

      <SingleProdSlider dataSet={data_values} interval={6} wrapClassName="multiClassName" />
    )
  }
}

Data values

const data=[
  {title:'title', description:'description', imageUrl:'image url', url:'link_url'},
  {title:'title', description:'description', imageUrl:'image url',}
  ...
]

const data_values = [
  {
    title: "first",
    realPrice:'$124',
    offerPrice:'$100',
    tag:'ASPIRE',
    offer:'SUPERSTAR',
    description: "Lorem Ipsum is...",
    imageUrl: "homeStrawHat.png",
    url: "www.url.com",
  },
  ...
]

Option

Options are set as responsive properties, they help you customize the no of slide show on screen.

const option = {
  responsive: { lg: 5, md: 4, sm: 2 },
  charLimit: 100,
};

Default values/options

PropertyDescriptionTypeDefault
lgYou can set number of slide show on screen, as per screen size.object5
mdYou can set number of slide show on screen, as per screen size.object4
smYou can set number of slide show on screen, as per screen size.object2
intervalSet slide interval timenumber5
wrapClassNameuse "wrapClassName" class, if you want to show multiple "as-slides" on same page.string
charLimitused for add description char limit to shownumber120

Example

Demo alt text alt text alt text

Keyword

as-slider, react-as-slider

License

MIT © Ajit16

0.0.6

5 months ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago