Giter VIP home page Giter VIP logo

arungovil / react-native-flatboard Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 0.0 527 KB

Flatlist based lightweight onboarding screen for React Native

Home Page: https://www.npmjs.com/package/react-native-flatboard

JavaScript 2.38% TypeScript 37.36% Ruby 3.03% Starlark 1.13% Java 29.17% CMake 0.51% C++ 13.64% Objective-C 4.47% Objective-C++ 8.31%
flatlist onboarding react-native swipable indicator

react-native-flatboard's Introduction

A Flatlist based onboarding screen for React Native

flatboard


Installation

Using npm

npm i react-native-flatboard

Using Yarn

yarn add react-native-flatboard

Note In case of error on first run, try restarting the metro server.

Basic usage:

import {View} from 'react-native';
import FlatBoard from 'react-native-flatboard';

export default function App() {
  const onComplete = () => {
    console.log('Onboarding Completed');
  };

  const data = [];

  return (
    <View style={{flex: 1}}>
      <FlatBoard
        data={data}
        onFinish={onComplete}
        accentColor="#93c01f"
        backgroundColor="#ecfccb"
        buttonTitle="Lets Go"
        hideIndicator
        headingStyles={{
          fontSize: 24,
          color: '#93c01f',
          textAlign: 'center',
        }}
      />
    </View>
  );
}

Data format:

const data = [
  {
    id: 1,
    title: 'Screen One',
    description: 'Description One',
    icon: require('image-path.jpg'),
  },
  {
    id: 2,
    title: 'Screen Two',
    description: 'Description Two',
    icon: require('image-path.jpg'),
  },
];

Customizing (props)

Name
Type Required Default Description
data array true Empty Array Array of data for each slide to be rendered.
onFinish function true none Function to call on tour end.
variant string false standard Flatboard theme, supports 'standard' & 'modern'.
accentColor string false #93c01f Accent color for primary/finish button.
backgroundColor string false #ffffff Background color for Flatboard screens.
buttonTitle array false Get Started Title for primary/finish button.
hideIndicator boolean false false Hide step indicator.
headingStyles StyleSheet false default styles Custom text styles for heading
descriptionStyles StyleSheet false default styles Custom text styles for description

Running locally

In the project directory, you can run:

yarn install
yarn start

Starts metro server in development mode.
Turn on Android emulator or connect external android device.

yarn android

Starts installing the app on your android emulator/device.

Your app will start running on the device.

react-native-flatboard's People

Contributors

arungovil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.