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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-easy-swiper

v0.1.15

Published

A simple and customizable swiper component for React Native

Downloads

12

Readme

React Native Easy Swiper 🚀

React Native Easy Swiper - is a versatile library that simplifies the implementation of swipeable views in React Native. With minimal setup, you can easily create swipeable images and components.

Table of Contents

Installation

To install, you can use npm or yarn:

npm install react-native-easy-swiper

or

yarn add react-native-easy-swiper

Demo

React Native Easy Swiper Demo 1     React Native Easy Swiper Demo 2     React Native Easy Swiper Demo 3 Try on snack

Core Features

  • Direction - Supports horizontal and vertical swiping direction
  • Animations - Supports fade and scale animation
  • Pagination - Provides three types of animated pagination styles with lots of customization

Basic Usage

import * as React from 'react';
import Swiper from "react-native-easy-swiper"
const images = [
  "https://www.beatsbydre.com/content/dam/beats/web/product/headphones/solo3-wireless/pdp/product-carousel/black/pc-solo3-black-thrqtr-left.jpg",
  "https://www.beatsbydre.com/content/dam/beats/web/product/headphones/solo3-wireless/pdp/product-carousel/black/pc-solo3-black-thrqtr-right.jpg",
  "https://www.beatsbydre.com/content/dam/beats/web/product/headphones/solo3-wireless/pdp/product-carousel/black/pc-solo3-black-folded.jpg",
];
export default function App() {
  return <Swiper images={images} />
}

Advance Usage

import * as React from 'react';
import { View, Image, StyleSheet } from 'react-native';
import Swiper from 'react-native-easy-swiper';
const images = [
  'https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
  'https://images.unsplash.com/photo-1606107557195-0e29a4b5b4aa?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=764&q=80',
  'https://images.unsplash.com/photo-1608231387042-66d1773070a5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1374&q=80',
];
export default function App() {
  return (
    <View style={styles.container}>
      <Swiper
        height={400}
        dotBorderStyle={{
          borderColor: 'white',
        }}
        dotColor='white'
      >
        {images.map((image, index) => (
          <Image
            key={index}
            source={{ uri: image }}
            style={
              {
                width: "100%",
                height: "100%",
                resizeMode: "cover"
              }} />
        ))}
      </Swiper>
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: '#000',
  },
  box: {
    width: 60,
    height: 60,
    marginVertical: 20,
  },
});

Api Documentation

Core Props

| Property | Types | Defaults | Description | | ------------ | ---------- | -------- | --------------------------------------------------------------- | | images | array | null | Array of strings, each of which represents a URL for an image | | imagesStyles | ImageStyle | {} | Styles for images | | children | ReactNode | null | Either pass images or children* | | horizontal | boolean | true | Swiper direction for vertical swiper pass horizontal={false} | | animations | array | [] | Can pass multiple animations scale fade |

Container Props

| Property | Types | Defaults | Description | | -------------- | --------- | ------------ | ---------------------------------- | | fullScreen | boolean | false | Takes full screen width and height | | height | number | screenHeight | Height of container | | width | number | screenWidth | Width of container | | containerStyle | ViewStyle | {} | Other styles for container |

Pagination Props

| Property | Types | Defaults | Description | | -------------- | ------------------------ | -------------------------- | ------------------------------------------------------------------------------- | | hideDot | boolean | false | Hides pagination | | dotType | dot border dashed | dashed | Pagination style | | dotColor | string | lightgray | Dot color | | dotPosition | left right top bottom | horizontal ? bottom : left | Postion of dot around container | | dotStyle | ViewStyle | null | Styles for dots | | dotMargin | number | 20 | Distance from container depending on dotPosition | | dotSpacing | number | 8 | Gap between dots | | activeDotColor | string | black | Active dot color | | dotBorderStyle | ViewStyle | {} | Default borderWidth: 1 and borderColor: "#1d1d1d" for dotType: "border" | | activeDashSize | number | 32 | Length of dash for dotType: "dashed" |

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library