Socket
Book a DemoInstallSign in
Socket

react-native-ipages

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ipages

Quickly implement swipable page views in React Native!

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

What is this?

A basic react-native version of SwiftUI's "iPages".

Quickly implement swipable page views in React Native!

Installation

npm i react-native-ipages

Example

import React from "react";
import { View } from "react-native";
import IPages from 'react-native-ipages';

const App = () => {

  const Component_1 = () => (
    <View style={{ backgroundColor: "pink", height: "100%" }} />
  );
  const Component_2 = () => (
    <View style={{ backgroundColor: "green", height: "100%" }} />
  );
  const Component_3 = () => (
    <View style={{ backgroundColor: "teal", height: "100%" }} />
  );
  
  return(
    <IPages
      components={[Component_1, Component_2, Component_3]}
      dotsFocusedColor={"purple"}
      infiniteScroll
    />
  );
};

export default App;

Options

Required

  • components - An array of react-native components that will be rendered as individual pages.

Optional

  • dotsFocusedColor - Colour of dot corresponding to current page. Any valid JavaScript colour (defaults to "black").
  • dotsUnfocusedColor - Colour of dots corresponding to all pages other than the current. Any valid JavaScript colour (defaults to "white").
  • hideDots - Hide the page indicator dots. true/false (defaults to false).
  • infiniteScroll - Allows for infinite scrolling. true/false (defaults to false).

Keywords

ipages

FAQs

Package last updated on 19 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.