Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gennadysx/react-native-skeleton-placeholder

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gennadysx/react-native-skeleton-placeholder

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

  • 5.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-34.78%
Maintainers
1
Weekly downloads
 
Created
Source

SkeletonPlaceholder

SkeletonPlaceholder is a React Native library to easily create an amazing loading effect with FlexBox.
Android and iOS

Installation

Note: This package requires @react-native-masked-view/masked-view and react-native-linear-gradient

Step #1

Using yarn:

yarn add @react-native-masked-view/masked-view react-native-linear-gradient

Using npm:

npm install @react-native-masked-view/masked-view react-native-linear-gradient --save

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

react-native link @react-native-masked-view/masked-view react-native-linear-gradient

Otherwise:

cd ios
pod install

  

Step #2

Using yarn:

yarn add @gennadysx/react-native-skeleton-placeholder

Using npm:

npm install @gennadysx/react-native-skeleton-placeholder --save

Usage

There are two ways to use this package:

with SkeletonPlacehoder.Item 🆕

import React from "react";
import { View } from "react-native";
import {Skeletonholder, SkeletonItem} from "@gennadysx/react-native-skeleton-placeholder";

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

or with View

import React from "react";
import { View } from "react-native";
import {Skeletonholder, SkeletonItem} from "@gennadysx/react-native-skeleton-placeholder";

const App = () => {
  return (
    <SkeletonHolder>
      <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>
    </SkeletonHolder>
  );
};

Properties

SkeletonPlaceholder
PropDescriptionTypeDefault
backgroundColorDetermines the color of placeholderstring#E1E9EE
highlightColorDetermines the highlight color of placeholderstring#F2F8FC
speedDetermines the animation speed in milliseconds. 0 disables animationnumber800
directionDetermines the animation direction"right" | "left""right"
SkeletonPlaceholder.Item
PropDescriptionTypeDefault
anyAny view style props was acceptedany

Contributing

You are welcome to contribute!

License

MIT

Keywords

FAQs

Package last updated on 27 Apr 2022

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