Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/goldenfishe/react-loader-placeholder

A React library used to make your loader awesome
https://github.com/goldenfishe/react-loader-placeholder

List: react-loader-placeholder

awesome component javascript loader placholder react spiner

Last synced: about 1 month ago
JSON representation

A React library used to make your loader awesome

Awesome Lists containing this project

README

        

# react-loader-placeholder
![npm version](https://badge.fury.io/js/react-loader-placeholder.svg)
![npm](https://img.shields.io/npm/dm/react-loader-placeholder)
![npm bundle size](https://img.shields.io/bundlephobia/min/react-loader-placeholder?color=green)

Make beautiful, animated loading that easy adapt to your app.

![Gif in action](https://media.giphy.com/media/JU3rc5Tn6kpYUNMnah/giphy.gif)

## Install

`npm install react-loader-placeholder`

## Principles
The `` uses HTML `data` attribute for mark items and CSS for style that items.

![Base usabe code](https://i.imgur.com/TJjPSr2.png)

## Usage

1. Wrap component or HTML with ``.
2. Set `loading` prop.
3. Mark HTML items with `data-react-loader-placeholder={true}` attribute.
4. ?????
5. PROFIT.

If you need to enable or disable not all marked items, just set `data-react-loader-placeholder}` to `true` or `false`.

##Props

The `` component props:
- **loading** `boolean` _required_ - Enable or disable placeholder.
- **color** `string` _optional_ - Background color of placeholder item.
- **disableAnimation** `boolean` _optional_ - Enable or disable animation.
- **className** `string` _optional_
- **style** `Object` _optional_