Socket
Socket
Sign inDemoInstall

@thevsstech/react-native-skeleton

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @thevsstech/react-native-skeleton

SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.


Version published
Weekly downloads
82
decreased by-47.1%
Maintainers
1
Install size
522 kB
Created
Weekly downloads
 

Readme

Source

Skeleton

Skeleton is a React Native library to easily create an amazing loading effect. [ANDROID & IOS]

This package includes the dependency **react-native-linear-gradient**

Installation

Note: If your project already includes the react-native-linear-gradient you can skip the Step #1

Step #1

Using yarn:

yarn add react-native-linear-gradient

Using npm:

npm install react-native-linear-gradient --save

If you are running a react-native version below 0.60:

react-native link react-native-linear-gradient

Otherwise:

cd ios
pod install

  

Step #2

Using yarn:

yarn add @thevsstech/react-native-skeleton

Using npm:

npm install @thevsstech/react-native-skeleton --save

Usage

There are two ways to use this package:

with SkeletonPlacehoder.Item 🆕

import React from "react";
import { View } from "react-native";
import Skeleton from "@thevsstech/react-native-skeleton";

const App = () => {
  return (
    <Skeleton>
      <Skeleton.Item flexDirection="row" alignItems="center">
        <Skeleton.Item width={60} height={60} borderRadius={50} />
        <Skeleton.Item marginLeft={20}>
          <Skeleton.Item width={120} height={20} borderRadius={4} />
          <Skeleton.Item
            marginTop={6}
            width={80}
            height={20}
            borderRadius={4}
          />
        </Skeleton.Item>
      </Skeleton.Item>
    </Skeleton>
  );
};

or with View

import React from "react";
import { View } from "react-native";
import Skeleton from "@thevsstech/react-native-skeleton";

const App = () => {
  return (
    <Skeleton>
      <View style={{ flexDirection: "row", alignItems: "center" }}>
        <View style={{ width: 60, height: 60, borderRadius: 50 }} />
        <View style={{ marginLeft: 20 }}>
          <View style={{ width: 120, height: 20, borderRadius: 4 }} />
          <View
            style={{ marginTop: 6, width: 80, height: 20, borderRadius: 4 }}
          />
        </View>
      </View>
    </Skeleton>
  );
};

Properties

Skeleton
PropDescriptionTypeDefault
backgroundColorDetermines the color of placeholderstring#E1E9EE
highlightColorDetermines the highlight color of placeholderstring#F2F8FC
speedDetermines the animation speed in millisecondsnumber800
Skeleton.Item
PropDescriptionTypeDefault
anyAny view style props was acceptedany

Contributing

Any help this module will be appreciated!

License

MIT

Keywords

FAQs

Last updated on 15 Oct 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc