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

@rn-components-kit/skeleton

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-components-kit/skeleton

Provide a placeholder while you wait for content to load, or to visualise content that doesn't exist yet.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Skeleton

NPM version

English | 中文

Provide a placeholder while you wait for content to load, or to visualise content that doesn't exist yet. It supports the following features:

  • avatar, title, paragraph three parts all can be customized
  • HOC component withSkeleton for you to fully customize skeleton

:warning: NOTE

If you use withSkeleton with decorator syntax, you should also install @babel/plugin-proposal-decorators.

How to use

npm install @rn-components-kit/skeleton --save
PreviewCode
Demo1 Code
Demo2 Code

Props

Reference

Props

style

Allows you to customize style

TypeRequiredDefault
objectno-
avatar

Show avatar placeholder (if false, avatar placeholder will not be shown)

TypeRequiredDefault
boolean | AvatarPropsnotrue

AvatarProps

  • style [object]: Allow you to customize avatar module's style
  • size [number]: The width and height of avatar. (default 20)
  • shape [enum('circle', 'square')]: The shape of avatar. (default 'circle')
title

Show title placeholder (if false, title placeholder will not be shown)

TypeRequiredDefault
boolean | TitlePropsnotrue

TitleProps

  • style [object]: Allow you to customize title block's style
  • width [number | string]: The width of title block
  • height [number]: The height of title block. (default 15)
paragraph

Show paragraph placeholder (if false, title paragraph will not be shown)

TypeRequiredDefault
boolean | ParagraphPropsnotrue

ParagraphProps

  • style [object]: Allow you to customize paragraph module's style
  • rows [number]: The count of paragraph block lines. (default 3)
  • widths [Array<number | string>]: An array of each block's width (if undefined or null, default 100%)
  • heights [Array]: An array of each block's height (if undefined or null, default 15)

Props for withSkeleton

Reference for withSkeleton

options

Config for skeleton

TypeRequiredDefault
withSkeletonOptionsno{duraion: 1000, minOpacity: 0.2, maxOpacity: 1}

withSkeletonOptions

  • duraion [number]: How long a loop animation lasts (default: 1000)
  • minOpacity [number]: The minimum opacity value during animation (default: 0.2)
  • maxOpacity [number]: The maximum opacity value during animation (default: 1)

Keywords

FAQs

Package last updated on 25 Jun 2019

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