npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-zi-carousel

v1.0.5

Published

A customizable carousel component for React Native All Versions.

Readme

react-native-zi-carousel

react-native-zi-carousel is a custom carousel component designed to address the issue of carousel implementations in newer versions of React Native, specifically when react-native-snap-carousel is not fully supported. This component is highly customizable and comes with various options to handle pagination, auto-scrolling, and effects such as scaling.

Author:

  • Mohammed Sadaqathullah

Installation

To install the react-native-zi-carousel package, you can use npm or yarn:

npm install react-native-zi-carousel

Usage

You can use the ZiCarousel component by importing it and passing the necessary props.

Example Usage:

import React from 'react';
import { View, Text } from 'react-native';
import ZiCarousel from 'react-native-zi-carousel';

const App = () => {
 const data = ['Item 1', 'Item 2', 'Item 3', 'Item 4'];

 return (
   <View style={{ flex: 1 }}>
     <ZiCarousel
       data={data}
       renderItem={({ item }) => (
         <View style={{ justifyContent: 'center', alignItems: 'center' }}>
         {customize}
         </View>
       )}
       itemSize={200}
       spacing={15}
       pagination={true}
       autoScroll={true}
       loop={true}
       scaleEffect={0.8}
       declarationRate={0.9}
       itemWidth={150}
     />
   </View>
 );
};

export default App;

Props

| Prop | Type | Default | Description | |--------------------|----------|--------------------------|----------------------------------------------------------------------------------------------------------| | data | Array | [] | The data array that will be rendered in the carousel. | | renderItem | Function | () => {} | Function to render each item in the carousel. | | itemSize | Number | width * 0.85 | The size of each item (width or height depending on the orientation). | | spacing | Number | 10 | The spacing between each item in the carousel. | | vertical | Boolean | false | Set to true to make the carousel vertical. | | pagingEnabled | Boolean | true | Set to true to enable paging, where the carousel scrolls one item at a time. | | showsHorizontalScrollIndicator | Boolean | false | Set to true to show the horizontal scroll indicator. | | showsVerticalScrollIndicator | Boolean | false | Set to true to show the vertical scroll indicator. | | snapToAlignment | String | 'center' | Defines how the content should align when snapping. Possible values: start, center, or end. | | snapToInterval | Number | itemSize + spacing | Defines the interval at which items snap. | | onMomentumScrollEnd | Function | () => {} | Callback when the scrolling animation ends. | | onScroll | Function | () => {} | Callback function to handle scroll events. | | contentContainerStyle | Object | {} | Style to apply to the content container of the carousel. | | maxToRenderPerBatch | Number | 1 | Defines the maximum number of items to render in a batch for performance optimization. | | initialNumToRender | Number | 1 | Number of items to render initially. | | pagination | Boolean | true | Set to true to show pagination dots at the bottom of the carousel. | | paginationStyle | Object | {} | Custom style for the pagination container. | | dotStyle | Object | {} | Custom style for the pagination dots. | | activeDotStyle | Object | {} | Custom style for the active pagination dot. | | inactiveDotStyle | Object | {} | Custom style for the inactive pagination dots. | | autoScroll | Boolean | false | Set to true to enable automatic scrolling after a set interval. | | autoScrollInterval | Number | 3000 | Interval (in milliseconds) for auto-scrolling. | | loop | Boolean | false | Set to true to loop the carousel indefinitely. | | loopInterval | Number | 5000 | Interval (in milliseconds) to reset the carousel when looping. | | scaleEffect | Number | 0.85 | Scale effect applied to the items as they are scrolled. | | animationDuration| Number | 500 | Duration (in milliseconds) for the item scale animation. | | declarationRate | Number | 0.8 | Controls the smoothness of the scrolling. A lower value will make the scrolling smoother. | | itemWidth | Number | width * 0.85 | Custom width for each item in the carousel. | | itemHeight | Number | height * 0.85 | Custom height for each item in the carousel. | | keyExtractor | Function | () => {} | Function to extract the unique key for each item. Example: (item, index) => item.id. |

Notes

Key Extractor

You can specify a custom key extractor for your data items by providing a keyExtractor function. For example:


<ZiCarousel
  data={data}
  renderItem={({ item }) => (
    <View style={{ justifyContent: 'center', alignItems: 'center' }}>
      <Text>{item}</Text>
    </View>
  )}
  keyExtractor={(item) => item.id.toString()} // Extracting key from item.id
/>

License

MIT License

ContactPackageSupport

[email protected]