New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gorhom/paper-onboarding

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gorhom/paper-onboarding

Paper Onboarding is a material design UI slider for `React Native`.

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
decreased by-29.55%
Maintainers
1
Weekly downloads
 
Created
Source

Paper Onboarding npm

Paper Onboarding is a material design UI slider for React Native inspired by Ramotion Paper Onboarding.

Installation

yarn add @gorhom/paper-onboarding
# or
npm install @gorhom/paper-onboarding

Also, you need to install react-native-reanimated, react-native-gesture-handler & react-native-svg

Usage

import PaperOnboarding, {PaperOnboardingItemType} from "@gorhom/paper-onboarding";

const data: PaperOnboardingItemType[] = [
  {
    title: 'Hotels',
    description: 'All hotels and hostels are sorted by hospitality rating',
    color: '#698FB8',
    image: /* IMAGE COMPONENT */,
    icon: /* ICON COMPONENT */,
  },
  {
    title: 'Banks',
    description: 'We carefully verify all banks before add them into the app',
    color: '#6CB2B8',
    image: /* IMAGE COMPONENT */,
    icon: /* ICON COMPONENT */,
  },
  {
    title: 'Stores',
    description: 'All local stores are categorized for your convenience',
    color: '#9D8FBF',
    image: /* IMAGE COMPONENT */,
    icon: /* ICON COMPONENT */,
  },
];

const Screen = () => {
  const handleOnClosePress = () => console.log('navigate to other screen')
  return (
    <PaperOnboarding
      data={data}
      onCloseButtonPress={handleOnClosePress}
    />
  )
}

Props

namerequireddefaultdescription
dataYESArray of pages/slides PaperOnboardingItemType to present.
safeInsetsNO{top: 50, bottom: 50, left: 50, right: 50}Safe area insets usually come from react-native-safe-area-context.
directionNOhorizontalPan gusture direction. horizontal or vertical
indicatorSizeNO40Indicator width and height.
indicatorColorNOwhiteIndicator border and fill color.
titleStyleNOText style to override all page/slide title default style.
descriptionStyleNOText style to override all page/slide description default style.
clostButtonTextStyleNOText style to override close button text default style.
closeButtonTextNOcloseText to be set in close button.
onCloseButtonPressYESCallback when user press on close button.
PaperOnboardingItemType
namerequireddefaultdescription
imageNOImage/component to be add the slide/page.
iconNOImage/component to be add the slide/page indicator.
colorYESBackground color for the slide/page.
titleYESTitle for the slide/page.
descriptionYESDescription for the slide/page.
titleStyleNOText style to override page/slide title default style.
descriptionStyleNOText style to override page/slide description default style.

Built With ❤️

Author

License

MIT

Keywords

FAQs

Package last updated on 04 Apr 2020

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc