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-flipper-cli

v0.1.0

Published

This package allows you use a cool page curl effect on your React Native apps, it works on Android, iOS, and Web

Downloads

6

Readme

This package allows you use a cool page curl effect on your React Native apps, it works on Android, iOS, and Web. Check out the demo here

Installation

yarn add react-native-flipper-cli

In order for this package to work properly, its built using expo-linear-gradient,react-native-gesture-handler,react-native-linear-gradient, and react-native-reanimated. So make sure you also have these installed,

yarn add react-native-linear-gradient react-native-gesture-handler react-native-linear-gradient react-native-reanimated

Landscape

Jul-18-2022 13-58-29

Landscape w/ singleImageMode

Jul-18-2022 13-59-32

Portrait

Usage

import PageFlipper from 'react-native-page-flipper';

const App = () => {
    return (
      <PageFlipper
        data={[
            'https://up.mangadudes.com/bleach/18/bleach-9337-e60a76a126bc6ecd3211aeaad51a7dba.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9338-89fcdb98b22c94781ba2846ea2e562c3.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9339-5d0e73373eb814d65b18bfa4ca533be8.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9340-c1220292956ae4cc1df0676e2d01c2e1.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9341-159bcbae27446cd1d6c964b4b70af020.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9342-024e1db41ff0ea6e6bc47574b209fda4.jpg',
            'https://up.mangadudes.com/bleach/18/bleach-9344-b14e956a08b6998dd00a61f89db84238.jpg',
        ]}
        pageSize={{
          height: 334, // the size of the images I plan to render (used simply to calculate ratio)
          width: 210,
        }}
        portrait={true}
        renderPage={(data) => <Image source={{ uri: data }} style={{ height: '100%', width: '100%' }} />}
      />
    )
}

export default App;

Props

| Prop name | Type | Default value | Description | | --------------- | ----------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | data | any[] | undefined | The data you want to render, an array of images, or strings for text urls | | renderPage | () => Element | undefined | The element to render for each item | | pageSize | Object | undefined | page size (used only to calculate ratio) | | contentContainerStyle | Object | undefined | style for content container | | enabled | bool | true | enables / disables the pan gesture handler of the pages | | pressable | bool | true | enables / disables the tapping on the pages to flip | | singleImageMode | bool | true | Defines whether each page is treated as a single image or two in one. (see above) | | renderLastPage | () => JSX.Element | undefined | optional function to render the last page (only applies when not in portrait mode and have an odd number of pages) | | portrait | bool | false | sets portrait mode (viewing a single page at a time, see above) | | onFlippedEnd | Function | undefined | Callback for when the page has finished flipping | | onFlippedStart | Function | undefined | Callback for when the page has started flipping, (does not trigger when user begins dragging the page, only when manually flipped by tapping the page or calling one of the exposed methods) | | onPageDragStart | Function | undefined | Callback for when the page has started dragging (user dragging with finger) | | onPageDrag | Function | undefined | Callback for when the page is actively being dragged | | onPageDragEnd | Function | undefined | Callback for when the page has finished dragging | | onInitialized | Function | undefined | Callback for when the page flipper is initialized | | renderContainer | Function | undefined | function to return an element for rendering the container of the viewer | | onEndReached | Function | undefined | Callback for when the page flipper reaches the last page |

Methods

| Method name | Description | | ------------ | --------------------------------- | | goToPage | flips to the page index passed in | | previousPage | flips to the previous page | | nextPage | flips to the next page |