1.1.6 • Published 11 months ago

@act-aks/rn-carousel v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

React Native Carousel Component

A performant, customizable carousel component for React Native with multiple animation types and TypeScript support.

Installation

npm install @act-aks/rn-carousel
# or
yarn add @act-aks/rn-carousel

Basic Usage

import { Carousel } from '@act-aks/rn-carousel'

const App = () => (
    <Carousel
        data={[1, 2, 3]}
        renderItem={item => (
            <View style={{ backgroundColor: 'tomato', height: 200 }}>
                <Text>{item}</Text>
            </View>
        )}
        autoPlay
        animationType={'slide'}
        itemWidth={300}
        spacing={20}
    />
)

API Reference

PropTypeDefaultDescription
dataT[]RequiredArray of items to render
renderItemfunctionRequiredRender function for individual items
directionstring'horizontal'Scroll direction ('horizontal' or 'vertical')
animationTypestring'slide'Animation style ('slide', 'fade', 'stack', 'page')
itemWidthnumber80% of screenWidth of each carousel item
itemHeightnumber50% of screenHeight of each carousel item
spacingnumber10Space between items
autoPlaybooleanfalseEnable automatic cycling through items
autoPlayIntervalnumber3000Interval between auto-play transitions (ms)

Animation Types

Configuration Guidelines

  • Use itemWidth/itemHeight to control visible item size
  • Set spacing for consistent gaps between items
  • Combine autoPlay with autoPlayInterval for timed transitions

License

MIT

1.1.6

11 months ago

1.1.5

11 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago