Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
react-lorem-component
Advanced tools
A component for React that renders paragraph or list item tags full of lorem ipsum placeholder text
A component for React that renders paragraph or list item tags full of lorem ipsum placeholder text.
Install via npm:
% npm install react-lorem-component
This library provides a React component named Lorem
which renderes pseudo-random lorem ipsum text.
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>
.
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 node module which is used internally to generate the lorem text.
Other properties you pass (eg. className
) are transferred to the wrapping tag.
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
.
Released under The MIT License.
FAQs
A component for React that renders paragraph or list item tags full of lorem ipsum placeholder text
The npm package react-lorem-component receives a total of 14,233 weekly downloads. As such, react-lorem-component popularity was classified as popular.
We found that react-lorem-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.