# react-skeleton-loader-pulse

> Skeleton Loader Pulse for ReactJS

Latest version **1.2.0** (published 2022-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-skeleton-loader-pulse
pnpm add react-skeleton-loader-pulse
yarn add react-skeleton-loader-pulse
bun add react-skeleton-loader-pulse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-03-11 |
| First published | 2020-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 20.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | André Coelho |
| Maintainers | avrcoelho |
| Keywords | react, reactjs, load, loader, pulse, animation |

## Links

- npm: https://www.npmjs.com/package/react-skeleton-loader-pulse
- Repository: https://github.com/avrcoelho/react-skeleton-loader-pulse
- Issues: https://github.com/avrcoelho/react-skeleton-loader-pulse/issues
- npm.io page: https://npm.io/package/react-skeleton-loader-pulse

## Dependencies (2)

- [styled-components](https://npm.io/package/styled-components.md) ^5.1.0
- [@storybook/addon-knobs](https://npm.io/package/@storybook/addon-knobs.md) ^5.3.18

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2022-03-11
- 1.0.21 — 2022-03-11
- 1.0.20 — 2022-03-11
- 1.0.18 — 2022-03-11
- 1.0.17 — 2022-03-11
- 1.0.16 — 2022-03-11
- 1.0.15 — 2020-05-21
- 1.0.14 — 2020-05-21
- 1.0.13 — 2020-04-28
- 1.0.12 — 2020-04-27
- 1.0.11 — 2020-04-27
- 1.0.10 — 2020-04-27
- 1.0.9 — 2020-04-27
- 1.0.8 — 2020-04-25
- 1.0.7 — 2020-04-25
- … 7 more at https://npm.io/package/react-skeleton-loader-pulse/versions

## README

# React Skeleton Loader Pulse Component

Skeleton Loader Pulse for ReactJS

![Demo](demo.gif)

## Install

```shell
npm install react-skeleton-loader-pulse
```

or

```shell
yarn add react-skeleton-loader-pulse
```

## Usage

### SkeletonItem

```js
import React from "react";
import { SkeletonItem } from "react-skeleton-loader-pulse";

export default function Component() {
  return <SkeletonItem />;
}
```

### Props

| property     | propType                      | required | default | description                |
| ------------ | ----------------------------- | -------- | ------- | -------------------------- |
| color        | string \| undefined           | \-       | \#ccc   | Skeleton color             |
| pulseTime    | number \| undefined           | \-       | 1       | pulse time in seconds      |
| width        | string \| number \| undefined | \-       | 100%    | width container component  |
| height       | string \| number \| undefined | \-       | 10px    | height container component |
| marginTop    | string \| number \| undefined | \-       | 0       | margin top component       |
| marginBottom | string \| number \| undefined | \-       | 0       | margin bottom component    |
| marginLeft   | string \| number \| undefined | \-       | 0       | margin left component      |
| marginRight  | string \| number \| undefined | \-       | 0       | margin right component     |
| borderRadius | string \| number \| undefined | \-       | 0       | border radius component    |

### SkeletonLayout

```js
import React from "react";
import { SkeletonLayout } from "react-skeleton-loader-pulse";

export default function Component() {
  return (
    <SkeletonLayout
      align="center"
      items={[
        {
          borderRadius: "50%",
          height: 100,
          marginBottom: 15,
          width: 100,
        },
        {
          height: 25,
          marginBottom: 10,
          width: 250,
        },
        {
          height: 10,
          width: 270,
        },
        {
          height: 10,
          width: 300,
        },
        {
          height: 10,
          width: 280,
        },
      ]}
    />
  );
}
```

### Props

| property  | propType                                   | required | default | description               |
| --------- | ------------------------------------------ | -------- | ------- | ------------------------- |
| color     | string \| undefined                        | \-       | \#ccc   | Skeleton color            |
| pulseTime | number \| undefined                        | \-       | 1       | pulse time                |
| width     | string \| number \| undefined              | \-       | 100%    | width container component |
| direction | "column" \| "row" \| undefined             | \-       | column  | flex\-direction of layout |
| align     | "center" \| "left" \| "right" \| undefined | \-       | left    | align items of layout     |
| items     | Item\[\]                                   | yes      | \-      | Layout: Array of objects  |
|           |                                            |          |         |                           |

### Props array Item

| property     | propType                      | required | default | description   |
| ------------ | ----------------------------- | -------- | ------- | ------------- |
| height       | number \| string              | yes      | \-      | height        |
| width        | number \| string \| undefined | \-       | 100%    | widtt         |
| borderRadius | number \| string \| undefined | \-       | 0       | border radius |
| marginBottom | number \| string \| undefined | \-       | 3px     | margin bottom |
| marginTop    | number \| string \| undefined | \-       | 3px     | margin top    |
| marginLeft   | number \| string \| undefined | \-       | 0       | margin left   |
| marginRight  | number \| string \| undefined | \-       | 0       | margin right  |

## LICENSE

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

Development by: [André Coelho](https://andrecoelho.dev)

---
_Source: https://npm.io/package/react-skeleton-loader-pulse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
