npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-dummy

v1.1.3

Published

Placeholder Images and Dummy Text for Vue.js

Downloads

886

Readme

vue-dummy

Placeholder Images and Dummy Text for Vue.js

vue-dummy is a wrapper around the https://dummyjs.com/ library to expose placeholder Images and Dummy, Lorum Ipsum Text as a vue directive

Usage

Add to your HTML page:

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-dummy"></script>

or, import into your module npm install vue-dummy --save-dev

import Vue from "vue"
import VueDummy from "vue-dummy"

Vue.use(VueDummy)

Dummy Text

<p v-dummy></p>

Choose the number of words:

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

Choose random amount of words between 3 & 10:

<p v-dummy="'3,10'"></p> <!-- Note: the quotes to pass the expression as a string -->
<p v-dummy:3,10></p> <!-- or, as a Vue argument-->

As a component:

<dummy></dummy>
<dummy text="30"></dummy>
<dummy t="1,3"></dummy>

Dummy Images

<img v-dummy="300" />
<img v-dummy="'400x300'" /> <!-- Note: the quotes to pass the expression as a string -->
<img v-dummy:400x300 /><!-- or, as a Vue argument -->
<img v-dummy.400x300 /><!-- or, as a Vue modifier -->

Use width & height attribues or, size with CSS

<img v-dummy width="150" height="150" />

Defaults to the size of the parent container

<img v-dummy />

Create random sized images. Useful for testing dimentions of unknown sized user uploaded images

<img v-dummy="'100,400x200,400'" /> <!-- Note: the quotes to pass the expression as a string -->
<img v-dummy:100,400x200,400 /> <!-- or, as a Vue argument (or modifier) -->

As a component:

<dummy img></dummy>
<dummy img="400x300"></dummy>
<dummy i="100"></dummy>

Special Elements

Using v-dummy on some tags will result in some placeholder content with expected markup. This is useful in some cases like quick styling of elements

<ol v-dummy></ol> <!-- outputs a small list -->
<ul v-dummy></ul> <!-- outputs a small list -->
<table v-dummy></table> <!-- outputs a small table -->

Example Repeat Elements

Combine with v-for to repeat elements

  <ul>
    <li v-for="i in 6" v-dummy>#{{i}}: </li>
  </ul>

Examples

https://git.io/vue-dummy-example