🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-native-skeletons

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-skeletons

Fully customizable small library with no extra dependencies for creating animated loading skeletons

1.3.6
latest
Source
npm
Version published
Weekly downloads
1K
-4.82%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Skeletons

A fully customizable small library with zero dependencies for creating animated loading skeletons.

Docs & Examples

  • Installation
  • Usage
  • Props Reference

Installation

yarn add react-native-skeletons

or

npm install react-native-skeletons

or

Copy this file

Usage

Simple one line skeleton:

  <Skeleton />

Skeleton with circle:

  <Skeleton circle width={40} height={40} />

Skeleton with count value:

  <Skeleton count={4} width={'100%'} height={14} />

Skeleton with custom styles:

  <Skeleton
    count={4}
    width={'100%'}
    height={14}
    color={'grey'}
    borderRadius={10}
    style={styles.myCustomStyle}
  />

Skeleton with spacing value:

   <Skeleton count={14} spacing={20} />

Props Reference

PropDescriptionDefault
colorThe background color of the skeleton.#ebebeb
widthThe width of the skeleton.100%
heightThe height of each skeleton line. (Can't use if `circle` is being used )14
borderRadiusThe border radius of the skeleton.4
countThe number of lines of skeletons.1
circle Makes the skeleton circular by setting borderRadius to half of width. false
style A custom style for the individual skeleton elements which is used alongside the default style
spacing Value for setting marginBottom when using with multiple skeleton elements. NOTE: this will only apply when count value is greater than 1

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 21 Mar 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