1.0.4 • Published 1 month ago

@coder-shubh/react-native-image-slider v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

You can install the @coder-shubh/react-native-image-slider package using npm or yarn:

# with npm
npm i @coder-shubh/react-native-image-slider react-native-vector-icons

# with yarn
yarn add @coder-shubh/react-native-image-slider react-native-vector-icons
import React, {useRef} from 'react';
import ImageSlider from '@coder-shubh/react-native-image-slider';

const images = new Array(6).fill(
  'https://cdn.pixabay.com/photo/2022/12/01/04/42/man-7628305_640.jpg',
);

const App = () => {

  return (
<ImageSlider
      images={images}
      imageHeight={250}
      dotSize={10}
      dotColor='silver'
      activeDotColor='blue'
      showNavigationButtons={true}
      showIndicatorDots={true}
      imageLabel={true}
      label='Example Label'
      extrapolate='clamp'
      autoSlideInterval={5000}
      containerStyle={{ marginBottom: 20 }}
      radius={5}
    />
  );
};

export default App;
PropTypeDescriptionDefault Value
imagesstring[]Array of image URLs to display in the slider.-
imageHeightnumberHeight of each image in the slider.250
dotSizenumberSize of the indicator dots.8
dotColorstringColor of inactive indicator dots.'silver'
activeDotColorstringColor of active indicator dot.'blue'
showNavigationButtonsbooleanWhether to show navigation buttons.true
showIndicatorDotsbooleanWhether to show indicator dots.true
imageLabelbooleanWhether to display image label.true
labelstringCustom label text for images.-
extrapolate'clamp' \| 'extend' \| 'identity'Image scroll extrapolation behavior.'clamp'
autoSlideIntervalnumberAuto slide interval in milliseconds.3000
containerStyleanyCustom style for the indicator container.{}
radiusnumberBorder radius for the image cards.5

In this table:

Prop: Name of the prop. Type: Type of the prop. Description: Description of what the prop does. Default Value: Default value of the prop, if any.

This project is licensed under the MIT License - see the LICENSE file for details.

In this version, I've added:

  • Title and badges centered at the top.
  • Descriptive text centered.
  • Table of Contents for easy navigation.
  • Stylish section headings.
  • Usage code block with syntax highlighting.
  • More visual appeal with horizontal lines and section separators.

Feel free to adjust the styles, colors, or any other aspects to better suit your preferences or project branding.