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

react-native-skeleton-loading

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-skeleton-loading

Smooth Skeleton Loader For expo and react-native. It is built on the top of react-native-reanimated v3, making it ectremely smooth and flawless.

  • 1.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
302
increased by12.69%
Maintainers
0
Weekly downloads
 
Created
Source
NPM VERSIONNPM WEEKLY DOWNLOADSGITHUB STARYOUTUBE VIEWSNPM LIFETIME DOWNLOADS

🏳️‍🌈 React Native Skeleton Loading

🟢 Skeleton Loading Component for React Native powered apps

Light Weight and Robust Skeleton Loader.
  • Design skeleton loading screen of your choice
  • Pass colors of your choice
  • Powered by Reanimated 3
  • Make your apps professional in UI/UX

Compatibility

iOSAndroidReact Native Cli

Expo Equivalent

For Expo Loader (Click Here)

🔌 Installation

$ npm install react-native-skeleton-loading

OR

$ yarn add react-native-skeleton-loading

Setup

This package is based on react-natve-reanimated 3 so according to their documentation, you need to initialize that in babel.config.js. To do that stop the metro bundler and then add following line of code to the return object of babel.config.js

plugins: ['react-native-reanimated/plugin']

After adding the line of code, start the bundler or project with --clear tag like,

npx expo start --clear

This will clear the bundler cache and you are ready to go.

😎 Displaying the skeleton loading

All you need is to just import the skeleton loading component, and in between the closing and ending tags, you can design the UI of your skeleton loading screen as shown in the code snippet below:

import SkeletonLoading from 'react-native-skeleton-loading'

const App = () => {

  return(
    <SkeletonLoading background={"#adadad"} highlight={"#ffffff"}>
        <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
          <View style={{ width: 100, height: 100, backgroundColor: "#adadad", borderRadius: 10 }} />

          <View style={{ flex:1, marginLeft: 10 }}>
              <View style={{ backgroundColor: "#adadad", width: "50%", height: 10, marginBottom: 3, borderRadius: 5 }} />
              <View style={{ backgroundColor: "#adadad", width: '20%', height: 8, borderRadius: 5 }} />
              <View style={{ backgroundColor: "#adadad", width: '15%', height: 8, borderRadius: 5, marginTop: 3 }} />
          </View>
        </View>
    </SkeletonLoading>
  )

};

For Live Demo (Expo Snack)

⭐ Props for the component

NameTypeDescription
backgroundhex color stringHex color string for the background of loading component
highlighthex color stringHex color string for the highlight of loading component

💲 Would you like to support me?

If you would like me come up with similar packages, buy me a cup of coffee to boost my energy.

Paypal

Keywords

FAQs

Package last updated on 04 Aug 2024

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