New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-lorem-ipsum

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lorem-ipsum

React Component for Creating Lorem Ipsum Text as Placeholder

1.0.4
Source
npm
Version published
Weekly downloads
5.9K
-12.71%
Maintainers
1
Weekly downloads
 
Created
Source

React Lorem Ipsum

React Lorem Ipsum is a React Component generates Lorem Ipsum placeholder text.

When backend API is not ready for data fetching and you have to make Frontend Development with static data until it comes, react-lorem-ipsum will create your texts for you easily.

React Lorem Ipsum is a zero-dependency lightweight (~4 kB) package.

NPM version npm download npm size

Install

npm install react-lorem-ipsum

or

yarn add react-lorem-ipsum

Demo

https://fatihtelis.github.io/react-lorem-ipsum

Props

NameTypeDefaultDescription
pCountnumber1Number of paragraphs created
avgWordsPerSentencenumber8Avarage number of words created for each sentence (standard deviation is fixed ±20%)
avgSentencesPerParagraphnumber8Avarage number of sentences created for each paragraph (standard deviation is fixed ±20%)
startWithLoremIpsumbooltrueStart with 'Lorem ipsum odor amet...' to first sentence of first paragraph

Example

React Code

import React from 'react';
import { render } from 'react-dom';
import LoremIpsum from 'react-lorem-ipsum';

render(
  <div className="wrapper">
    <LoremIpsum pCount={2} />
  </div>,
  document.getElementById('root'),
);

HTML Output

<div class="wrapper">
  <p>
    Lorem ipsum odor amet, interdum ultricies scelerisque. Fusce gravida tellus condimentum
    penatibus gravida senectus ligula maximus. Laoreet ad bibendum vel facilisis lacinia sem
    nascetur. Congue nec egestas netus faucibus convallis conubia. Nam potenti porttitor dignissim
    blandit mus integer velit class. Luctus sed suscipit luctus pellentesque massa ultrices senectus
    erat. Convallis finibus congue placerat vel donec. Dui eros commodo arcu lobortis ad mattis
    hendrerit habitasse. Cubilia facilisis ultricies habitasse volutpat mattis eros suscipit
    adipiscing. Pulvinar ligula etiam magna enim netus eleifend.
  </p>
  <p>
    Mattis libero porta bibendum sed dapibus mattis sociosqu a sapien. Etiam cras ante venenatis
    fames et nunc cursus facilisis ultricies. Turpis fames felis justo rhoncus donec fermentum.
    Donec libero ornare auctor mollis vel odio duis. Posuere rhoncus fringilla proin egestas diam
    primis. Porta suspendisse lorem ridiculus dapibus inceptos quam euismod risus. Proin nec sed
    cras mattis dolor eros blandit.
  </p>
</div>

License

react-lorem-ipsum is released under the MIT license.

Keywords

react

FAQs

Package last updated on 17 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts