npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rn-components-kit/skeleton

v1.0.1

Published

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

Downloads

3

Readme

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

|Preview|Code| |------------|:---------:| ||Demo1 Code| ||Demo2 Code|

Props

Reference

Props

style

Allows you to customize style

|Type|Required|Default| |----|--------|-------| |object|no|-|

avatar

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

|Type|Required|Default| |----|--------|-------| |boolean | AvatarProps|no|true|

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)

|Type|Required|Default| |----|--------|-------| |boolean | TitleProps|no|true|

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)

|Type|Required|Default| |----|--------|-------| |boolean | ParagraphProps|no|true|

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

|Type|Required|Default| |----|--------|-------| |withSkeletonOptions|no|{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)