# react-lorem-component

> A component for React that renders paragraph or list item tags full of lorem ipsum placeholder text

Latest version **0.13.0** (published 2018-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-lorem-component
pnpm add react-lorem-component
yarn add react-lorem-component
bun add react-lorem-component
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.13.0 |
| Published | 2018-03-14 |
| First published | 2014-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 78 |
| Author | Martin Andert |
| Maintainers | martinandert |
| Keywords | react, react-component, lorem, ipsum, random |

## Links

- npm: https://www.npmjs.com/package/react-lorem-component
- Repository: https://github.com/martinandert/react-lorem-component
- Issues: https://github.com/martinandert/react-lorem-component/issues
- npm.io page: https://npm.io/package/react-lorem-component

## Dependencies (4)

- [lorem-ipsum](https://npm.io/package/lorem-ipsum.md) ^1.0.3
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0
- [seedable-random](https://npm.io/package/seedable-random.md) 0.0.1
- [create-react-class](https://npm.io/package/create-react-class.md) ^15.5.3

## 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

- 0.13.0 (latest) — 2018-03-14
- 0.12.2 — 2017-07-25
- 0.12.1 — 2017-05-28
- 0.12.0 — 2017-05-23
- 0.11.0 — 2016-11-02
- 0.10.1 — 2016-08-02
- 0.10.0 — 2015-10-29
- 0.9.1 — 2015-03-27
- 0.9.0 — 2014-12-11
- 0.8.0 — 2014-08-01
- 0.7.0 — 2014-03-22
- 0.6.4 — 2014-02-19
- 0.6.3 — 2014-02-19
- 0.6.2 — 2014-02-19
- 0.6.1 — 2014-02-18
- … 9 more at https://npm.io/package/react-lorem-component/versions

## README

# React Lorem Component

A component for [React][1] that renders paragraph or list item tags full of [lorem ipsum][2] placeholder text.


## Installation

Install via npm:

```bash
% npm install react-lorem-component
```


## Usage

This library provides a React component named `Lorem` which renderes pseudo-random lorem ipsum text.

```jsx
var React = require('react');
var Lorem = require('react-lorem-component');

var MyComponent = React.createClass({
  render: function() {
    return (
      <div>
        <h1>Lorem Ipsum</h1>
        <Lorem />
      </div>
    );
  }
});
```

The above `<Lorem />` tag by default renders five paragraphs of lorem wrapped in a `<div>`.


### Configuration Options

You can pass the following props to the `Lorem` component to fine-tune the output.

Prop                | Default            | Description
------------------- |:------------------:| ------------
mode                | 'paragraphs'       | if set to `'list'`, instead of `<p>` tags wrapped in a `<div>` it renders `<li>`s wrapped in an `<ul>`
ordered             | false              | if `mode` is set to `'list'` and this prop has a truthy value, the list items are wrapped in an `<ol>` tag
seed                | 0                  | the seed of the random number generator used for generating lorem text; changing this to a different natural number generates a different text
count               | 5                  | number of paragraphs to generate
sentenceLowerBound  | 5                  | minimum words per sentence
sentenceUpperBound  | 15                 | maximum words per sentence
paragraphLowerBound | 3                  | minimum sentences per paragraph
paragraphUpperBound | 7                  | maximum sentences per paragraph
format              | 'html'             | plain text or html
words               | ['ad','dolor',...] | custom word dictionary

The last seven properties are send directly to the [lorem-ipsum][3] node module which is used internally to generate the lorem text.

Other properties you pass (eg. `className`) are transferred to the wrapping tag.


## Example

The examples code is located at `example` directory. You can clone this repository and run `make install example` and point your web browser to
`http://localhost:3000`.


## Licence

Released under The MIT License.


[1]: http://facebook.github.io/react/
[2]: http://en.wikipedia.org/wiki/Lorem_ipsum
[3]: https://github.com/knicklabs/node-lorem-ipsum

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