1.0.16 • Published 4 months ago

react-native-sg-carousel v1.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

react-native-sg-carousel

react-native-sg-carousel is a lightweight and customizable carousel component for React Native. It supports dynamic content and allows you to style the carousel and its indicators easily.


Installation

Install the package using npm or yarn:

npm install react-native-sg-carousel

yarn add react-native-sg-carousel

Props

Prop NameTypeRequiredDescription
childrenReactNodeYesThe elements to be rendered inside the carousel.
stylingObjectNoCustom styles for the carousel container.
bubleColorStringNoBackground color for the inactive indicator bubbles.
activeBubleColorStringNoBackground color for the active indicator bubble.

Usage

import { Image, StyleSheet, View } from 'react-native';
import React from 'react';
import CustomCarouselView from 'react-native-sg-carousel';

const App = () => {
  return (
    <View style={styles.container}>
      <CustomCarouselView
        bubleColor="#000000"
        activeBubleColor="#FF0000"
        styling={styles.carouselArea}
      >
        <Image source={require('./images/one.png')} style={styles.img} />
        <Image source={require('./images/two.png')} style={styles.img} />
        <Image source={require('./images/three.png')} style={styles.img} />
      </CustomCarouselView>
    </View>
  );
};

export default App;

const styles = StyleSheet.create({
  container: {
    minHeight: '100%',
    backgroundColor: '#FFFFFF',
    alignItems: 'center',
    justifyContent: 'center',
  },
  img: {
    width: 400,
    height: 400,
  },
  carouselArea: {
    margin: 10
  },
});
1.0.16

4 months ago

1.0.14

4 months ago

1.0.13

4 months ago

1.0.12

4 months ago

1.0.11

4 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

5 months ago