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-content-shimmer

v2.2.6

Published

Content Shimmer to easily create placeholder loading, image loading, card loading, etc .., free to change the colors, speed, sizes, radius and shadow also have few deafult Loding Componets to use. (CardShimmer,ProfileShimmer,SocialShimmer,BulletListShimme

Downloads

921

Readme

React Content Shimmer / Loader

Note : New Version v2.2.5 Corrected spelling Mistake Please Refer the docs ... Happy Coding 😀

Content Shimmer to easily create placeholder loading, image loading, card loading, etc .., free to change the colors, speed, sizes, radius and shadow also have few default Loading Components to use.

ExampleCode

NPM JavaScript Style Guide

Features

  • Customizable: Feel free to change the colors, speed, sizes, radius and shadow;
  • Plug and play: with many default components to use see the example below.
  • 📝DIY: create your own custom loaders easily;

Install

npm i --save react-content-shimmer

Usage

import ContentShimmer from 'react-content-shimmer'
const YourStyleName = () => {
  return (
   <ContentShimmer />
  )
}

Options

| Prop name and type | Values | Description | | ------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | rows?: number Defaults to 1 | - | It's used to create multiple loader at once in a page | | background?: string Defaults to #eeeeee | - | It's is used to change the background of your ContentShimmer| | foreground?: string Defaults to #dddddd | - | It's is used to change the foreground color of your ContentShimmer| | elevation?: number Defaults to 0.08 | - | It's is used for background outset shadow to your ContentShimmer| | speed?: number Defaults to 1s | - | Controll Speed of animation support value in seconds| | rounded?: string Defaults to 0px | - | Curve of your Loader Component in px , percentage (%)...available for use in <ContentShimmer/> , <ProfileShimmer />| | style?: object | - | Give extra styling you want accept all css properties | | size?: {height? : number, Width? : number} | - | It's used to change the height and width your ContentShimmer only props use while creating custom ContentShimmer <ContentShimmer /> | | radius?: string Defaults to sm | (xs - sm - md - lg - xl) | It's is used as giving curve from corner only available in <ProfileShimmer />. | | variant?: string Defaults to rounded| (default - rounded)| Shape for the define Style like <SocialShimmer />, <CodeShimmer />,<BulletListShimmer />| | animation?: string Defaults to wave| (wave - pulse)| Change animation for any of your shimmer or loader|

Example

**Plug and play components**

1. Social Style

import { SocialShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
  return (
    <SocialShimmer  />
  )
}

ExampleCode

2. Bullet List Style

import { BulletListShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
  return (
    <BulletListShimmer  />
  )
}

ExampleCode

3. Code Style

import { CodeShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
  return (
    <CodeShimmer  />
  )
}

ExampleCode

4. Profile Style

import { ProfileShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
  return (
    <ProfileShimmer  />
  )
}

ExampleCode

5. Custom Creation

Custom ContentShimmer workes more well with the css or bootstrap classes Create with this Css Tricks will works Awesome 😎 Live Working Example at the Top

import ContentShimmer from 'react-content-shimmer'
const YourStyleName = () => {
  return (
    <div className="p-2 d-flex align-items-center">
      <div>
        <div className="p-2 d-flex align-items-center">
          <ContentShimmer size={{ height: 80, width: 80 }} rounded="10%" />
          <div className="p-3">
            <ContentShimmer style={{ marginBottom: "1rem" }} size={{ height: 15, width: 200 }} />
            <ContentShimmer size={{ height: 15, width: 100 }} />
          </div>
        </div>
        <ContentShimmer style={{ marginTop: "1rem" }} rounded={"10px"} size={{ height: 15, width: 350 }} />
        <ContentShimmer style={{ marginTop: "1rem" }} rounded={"10px"} size={{ height: 15, width: 350 }} />
      </div>
    </div>
  )
}

Contact

License

MIT © Tirth886