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

react-styled-loading-skeleton

v1.1.1

Published

Animated loading skeleton on styled-components based.

Downloads

5

Readme

react-styled-loading-skeleton

Animated loading skeleton on styled-components based for React.

Description

This package provides a stub component that can be used while the main content of the site is loading. The component can be modified for different types of content: round avatars, composition.

Features

  • Suitable for React.
  • Easy to integrate.
  • Easy to modify.
  • It can be used for any purpose where you need to show the process of loading content blocks.

Installation

Install the package via npm:

npm install --save react-styled-loading-skeleton

Demo

You can check storybook live demo

Use

Once installed, import the component and use it in your app:

import {  Skeleton} from 'react-styled-loading-skeleton';

// ...

function App() {

// ...

    return (
        { loading
         ? <Skeleton />
         : <div>Your Content</div>
        }
    );
}

If you need to change the visual representation of the Skeleton boot component, you can pass props for modification.

| Prop | Description | Default | |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------|:----------------------------------| | width?: number | Width in pixels | undefined | | widthPercentage?: number | Width as a percentage | 100% | | height?: number | Height in pixels | font size | | heightPercentage?: number | Height as a percentage | 100% | | rounded?: number | Rounding borders in pixels (border-radius) | none | | roundedPercentage?: number | Rounding borders as a percentage | none | | isCircle?: boolean | Round to the shape of a circle | false | | duration?: number | Animation duration (ms) | 1500 | | timingFunc?: CSSProperties['animationTimingFunction'] | Animation type | ease-in-out | | baseColor?: string | Primary background color | #e9e9e9 | | highlightColor?: string | Highlight color animation | #f9f9f9 | | gradient?: string | Background gradient. background-image: linear-gradient() | 90deg, #e9e9e9, #f9f9f9, #e9e9e9 | | count?: number | Number of skeletons per row | undefined | | flex?: { direction?: CSSProperties['flexDirection']; gap?: CSSProperties['gap']; justifyContent?: CSSProperties['justifyContent']; alignItems?: CSSProperties['alignItems']; } | Align skeletons in a row column. Must be used in conjunction with count! | undefined | | withoutAnimation?: boolean | Disable animation | false | | style?: CSSProperties | Any css properties | undefined |

License

This project is distributed under the MIT license.