1.0.3 • Published 2 years ago

react-slider-views v1.0.3

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

react-slider-views

Mirror for react-swipeable-views because original component do not have a correct support. The component works exactly that react-swipeable-views and you can see the same documentation.

A React component for swipeable views.

Documentation

Get started

Component API

More

Installation

Browser

npm i --save react-slider-views

The problem solved

Check out the demos from a mobile device (real or emulated). It's tiny (<10 kB gzipped), it quickly renders the first slide, then lazy-loads the others.

Simple example

usage

Browser

import React from "react";
import SliderViews from "react-slider-views";

const styles = {
    slide: {
        padding: 15,
        minHeight: 100,
        color: "#fff",
    },
    slide1: {
        background: "#FEA900",
    },
    slide2: {
        background: "#B3DC4A",
    },
    slide3: {
        background: "#6AC0FF",
    },
};

const MyComponent = () => (
    <SliderViews>
        <div style={Object.assign({}, styles.slide, styles.slide1)}>slide n°1</div>
        <div style={Object.assign({}, styles.slide, styles.slide2)}>slide n°2</div>
        <div style={Object.assign({}, styles.slide, styles.slide3)}>slide n°3</div>
    </SliderViews>
);

export default MyComponent;

Supported platforms

The API is as consistent as possible between the three platforms so the same component can be used independently on where it's running.

Browser

IEEdgeWindows PhoneFirefoxChromeSafari
>= 10x>= 28>= 29>= 8

Legacy browser support

react-slider-views supports modern browsers out-of-the-box, but requires additional CSS to support legacy browsers. To support IE 10 and older versions of Mobile Safari, include react-slider-views/build/styles/legacy-browser-support.css.

browser

iOS

ios

Android

android

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago