Skip to content

sroehrl/fillr

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

I just want to use it:

fillr

Quickly present your designs with the famous "Lorem Ipsum" text.

Try it out: codepen

Using it? consider leaving me a star

How to use

CDN: Place the following script tag into your project

<script src="https://cdn.jsdelivr.net/npm/fillr@1.0.0" defer></script>

Replace @v0.2.0 with desired version found from: Available versions of Fillr

Just fill in {{lorem}} wherever you please. You can utilize basic functions:

loop(n)

Will generate n repetitions of the element.

<ul>
  <li>{{lorem.loop(4)}}</li>
</ul>

rows(n)

Will generate n rows within the element.

<p>{{lorem.rows(4)}}</p>

NOTE: combinations are possible. {{lorem.rows(5).loop(3)}}

But my JS-framework screams at me?!

Using one of the many frameworks utilizing the double curly brackets? Worry not, you can simply use hard brackets instead:

<h1>[[lorem]]</h1>

Special mention

Based on the idea of digitalvillainy's loremFill:

  • no more copying & pasting of placeholer text
  • easy to remove/replace with real content
  • output variations that test your design by simply reloading the page (ups, I did not expect the real headline to be so long...)

About

Finally making placeholder text convenient AND realistic

Resources

License

Stars

Watchers

Forks

Packages

No packages published