JSPM

react-native-carousel-image-slider

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 40
  • Score
    100M100P100Q73052F
  • License MIT

A simple and fully customizable React Native Carousel Slider component, support to IOS and Android.

Package Exports

  • react-native-carousel-image-slider
  • react-native-carousel-image-slider/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-carousel-image-slider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Native Carousel Image Slider

A simple and fully customizable React Native Carousel Slider component, support to IOS and Android.


Installation

$ npm i --save react-native-carousel-image-slider

OR

$ yarn add react-native-carousel-image-slider

Basic Usage

  • Class Component:

import React from "react";
import { View } from "react-native";
import { CarouselSlider } from "react-native-carousel-image-slider";

export class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      images: [],
    };
  }

  render() {
    return (
      <View style={{ width: "100%", flex: 1, padding: 24 }}>
        <CarouselSlider images={this.state.images} />
      </View>
    );
  }
}
  • Function Component:

import React, { useState } from "react";
import { View } from "react-native";
import { CarouselSlider } from "react-native-carousel-image-slider";

export default function App() {
  const [images, setImages] = useState([]);

  return (
    <View style={{ width: "100%", flex: 1, padding: 24 }}>
      <CarouselSlider images={images} />
    </View>
  );
}

Props

  • images: string[];
  • renderDots?: boolean;
  • onImagePress?: ((event: GestureResponderEvent) => void) | undefined;
  • activeDotColor?: string;
  • inactiveDotColor?: string;
  • dotStyle?: ViewStyle;
  • resizeMethod?: "auto" | "resize" | "scale";
  • resizeMode?: ImageResizeMode;
  • imageStyle?: ImageStyle;
  • disabledOnPress?: boolean;
  • buttonActiveOpacity?: number;

Contributing

  • Fork or clone this repository
  $ git clone https://github.com/GusttavoCastilho/react-native-carousel-image-slider.git