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

rn-skeleton-placeholder

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-skeleton-placeholder

Skeleton placeholder is a React Native library designed to effortlessly generate a captivating loading effect.

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

rn-skeleton-placeholder

SkeletonPlaceholder is a React Native library designed to effortlessly generate a captivating loading effect.

skeleton-placehplder-gif

Installation

npm install rn-skeleton-placeholder

Usage

import React from 'react';
import { View, StyleSheet, SafeAreaView } from 'react-native';
import { SkeletonPlaceholder } from 'rn-skeleton-placeholder';

const SkeletonPlaceHolderExample: React.FC = () => {
  return (
    <View style={styles.container}>
      <SafeAreaView style={styles.iosStatusBarStyle} />
      <>
        <View style={styles.header}>
          <SkeletonPlaceholder
            itemWidth={128}
            itemHeight={14}
            itemStyle={{
              borderRadius: 4,
            }}
          />
          <SkeletonPlaceholder
            itemWidth={52}
            itemHeight={52}
            itemStyle={{
              borderRadius: 100,
            }}
          />
        </View>
        <SkeletonPlaceholder
          itemCount={8}
          itemWidth={160}
          itemHeight={160}
          containerStyle={styles.listContainer}
          itemStyle={styles.itemStyle}
        />
      </>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
  header: {
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent: 'space-between',
    backgroundColor: '#04a8f4',
    paddingBottom: 10,
    paddingHorizontal: 22,
    borderBottomLeftRadius: 22,
    borderBottomRightRadius: 22,
  },
  iosStatusBarStyle: {
    paddingTop: 10,
    backgroundColor: '#04a8f4',
  },
  listContainer: {
    marginTop: 22,
    paddingBottom: 100,
    flexWrap: 'wrap',
    flexDirection: 'row',
    justifyContent: 'space-between',
    paddingHorizontal: 22,
  },
  itemStyle: {
    marginBottom: 8,
    borderRadius: 22,
  },
  innerContainer: {
    marginBottom: 62,
  },
});

export default SkeletonPlaceHolderExample;

Contributing

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

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 04 Aug 2023

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