New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-carousel-loop

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-carousel-loop

A typescript based infinite carousel for react-native

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

Typescript implementation of https://github.com/phil-r/react-native-looped-carousel with small fixes.

Example usage

import React, { Component } from 'react';
import { Text, View, Dimensions } from 'react-native';
import Carousel from 'react-native-looped-carousel';

const { width, height } = Dimensions.get('window');

export default function Example() {
  const handleNextPage = (index: number) => {
    console.log(index);
  };
  return (
    <View style={{ flex: 1 }}>
      <Carousel
        delay={2000}
        style={{ width, height }}
        autoplay
        pageInfo
        onAnimateNextPage={handleNextPage}
      >
        <View style={[{ backgroundColor: '#BADA55' }, this.state.size]}>
          <Text>1</Text>
        </View>
        <View style={[{ backgroundColor: 'red' }, this.state.size]}>
          <Text>2</Text>
        </View>
        <View style={[{ backgroundColor: 'blue' }, this.state.size]}>
          <Text>3</Text>
        </View>
      </Carousel>
    </View>
  );
}

Props

interface CarouselProps {
  children: ReactNode;
  autoplay?: boolean;
  delay?: number;
  currentPage?: number;
  style?: ViewProps['style'];
  pageStyle?: ViewProps['style'];
  contentContainerStyle?: ViewProps['style'];
  pageInfo?: boolean;
  pageInfoBackgroundColor?: string;
  pageInfoTextStyle?: TextProps['style'];
  pageInfoBottomContainerStyle?: ViewProps['style'];
  pageInfoTextSeparator?: string;
  bullets: boolean;
  bulletsContainerStyle?: TextProps['style'];
  bulletStyle?: TextProps['style'];
  arrows?: boolean;
  arrowsContainerStyle?: TextProps['style'];
  arrowStyle?: TextProps['style'];
  leftArrowStyle?: TextProps['style'];
  rightArrowStyle?: TextProps['style'];
  leftArrowText?: string;
  rightArrowText?: string;
  chosenBulletStyle?: TextProps['style'];
  onAnimateNextPage?: (index: number) => void;
  onPageBeingChanged?: (index: number) => void;
  swipe?: boolean;
  isLooped?: boolean;
}

FAQs

Package last updated on 22 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc