GithubHelp home page GithubHelp logo

annnfrann / dummyjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulcollett/dummyjs

0.0 1.0 0.0 22.6 MB

dummyjs.com placeholder text & images for HTML prototyping

Home Page: https://dummyjs.com/

JavaScript 34.99% HTML 45.52% CSS 19.48%

dummyjs's Introduction

Dummy.js โ€“ Crash test your front-end builds with:

Repeatable Elements, Dummy Text and Placeholder Images

dummy.js

Dummy.js is a simple drop-in script that makes it easy to fill your HTML with dummy text and images for development.

Latest documentation and examples can be found at:

Usage

Add the script tag to your HTML page:

<script src="https://dummyjs.com/js"></script>

or, for short:

<script src="//dummyjs.com/js"></script>

Dummy Text

<p data-dummy></p>

Choose the amount of words:

<p data-dummy="150"></p>

Render dummy markup for ol ul table:

<table data-dummy></table>

Choose a random amount of words between 3 and 10:

<p data-dummy="3,10"></p>

Dummy Images

<img data-dummy="400x300" />

Defaults to the size of the parent container

<img data-dummy />

Custom Text

<img data-dummy="400x300" data-text="person" />

Custom Colors

<img data-dummy="400x300" data-color="#0000ff" data-text-color="#fff" />

Repeat Elements

<div data-repeat="3">Team Member</div>

Repeat a random amount of times between 3 and 10:

<p data-repeat="3,10"></p>

Kitchen Sink

Output all the common tags including headings, paragraphs, etc. Great for base styling.

<div data-dummy="sink"></div>

Copy Elements

Duplicate elements into other areas of your webpage. Pass a CSS selector like .myelement or .post h3

<div data-copy=".pagination"></div>

More Docs and Examples are available at:

https://dummyjs.com/

Usage with jQuery and other Frameworks

Vanilla Javascript:

Dummy.text(2, 6)
Dummy.src(300, 400)

jQuery:

jQuery('p').dummy(30)

Vue.js: https://www.npmjs.com/package/vue-dummy

Other Frameworks / Module Builders: npm install dummyjs --save

var Dummy = require('dummyjs');

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.