VanHoutte / rn-placeholder

:dash: :dizzy: :sparkles: Display some placeholder stuff before rendering your text or media content in React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status License: MIT

Display some placeholder stuff before rendering your text or media content in React Native. Compatible with Expo and react-native-web.

Here's a Snack application using the module and the different animations with copy to clipboard!


Image of the placeholder in action

Usage

Installation

$ yarn add rn-placeholder

In your code

import {
  Placeholder,
  PlaceholderMedia,
  PlaceholderLine,
  Fade
} from "rn-placeholder";

const App = () => (
  <Placeholder
    Animation={Fade}
    Left={PlaceholderMedia}
    Right={PlaceholderMedia}
  >
    <PlaceholderLine width={80} />
    <PlaceholderLine />
    <PlaceholderLine width={30} />
  </Placeholder>
);

The v3 comes with an example app that provides different stories and example of the library:

Run the example app

To start the app:

$ git clone https://github.com/mfrachet/rn-placeholder
$ cd rn-placeholder
$ yarn
$ cd ./example && yarn && yarn start

You can modify any call of yarn by npm install

V3 features

About

:dash: :dizzy: :sparkles: Display some placeholder stuff before rendering your text or media content in React Native

License:MIT License


Languages

Language:TypeScript 99.5%Language:JavaScript 0.5%