placeholder text & images for HTML prototyping in modern JS apps
npm install dummyjsSpeed up and crash test your front-end builds and HTML prototypes with a range of dynamic placeholder content that helps you test for all the edge cases with image and text sizes. Throw in easy repeatable & cloning of elements and you have the perfect companion for your battle tested builds.
Going through the front-end creation process requires the frequent need to test with dynamic images and text of various sizes to battle test the html + css styling. This can be a time consuming manual step, but also a crucial one to simulating user generated content, testing word wrapping, repeating of elements, etc. To battle test the front end for these edge cases not only quicker, but more thoroughly, the first version of DummyJs was realized to add a layer of automation to this process.
From here DummyJS has extended to double as a robust tool in JS first development environments, like React and Vue and also Node JS.
_Latest documentation and examples can be found at:_
Add the script tag to your HTML page:
``html`
or for JS use in React and JS apps:
``
npm install dummyjs --save-dev`js`
const Dummy = require('dummyjs'); // es5 or node
import Dummy from 'dummyjs'; // es6
`html``js`
Dummy.text()
Choose the amount of words:
`html``js`
Dummy.text(150)
Choose a random amount of words between 3 and 10:
`html``js`
Dummy.text(3,10)
`html``js`
Dummy.img(400,300)
Defaults to the size of the parent container
`html`
Random size
`html``js`
Dummy.img('400,100x100,400')
Custom Text
`html`
Custom Colors
`html`
, select, table, forms and more are automatically outputted with suitable contents.Output a kitchen sick of headings, tables, images & form elements
`html
`
`js
Dummy.html() // returns a string of html elements
`Output a specific element:
`html
`
`js
Dummy.html('table') // returns a string of html elements
`Or, multiple elements:
`html
`
`js
Dummy.html('h1,table,form,ul,p') // returns a string of html elements
`
Repeat Elements
`html
Team Member
`Repeat a random amount of times between 3 and 10:
`html
`Copy Elements
Duplicate elements into other areas of your webpage. Pass a CSS selector like
.myelement or .post h3`html
`More Docs and Examples are available at:
https://dummyjs.com/
- Bootstrap examples https://dummyjs.com/docs/bootstrap.html
- Shh.. New features https://dummyjs.com/docs/undocumented.html
$3
jQuery:
`js
jQuery('p').dummy(30)
``Vue.js:
https://www.npmjs.com/package/vue-dummy
Issues and suggestions:
https://github.com/paulcollett/dummyjs