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

vue2-undraw

v0.3.1

Published

A component library of undraw.co for vue.

Downloads

130

Readme

vue2-undraw

Vue Illustration Components from https://undraw.co/ For any requests open an issue on https://github.com/netzfluencer/vue-undraw/issues

Main Features

  • global default color setup
  • component color prop for indivdual color on components instances
  • general 'vue-undraw' class for global illustration styling
  • indivual 'vue-undraw--{componentName}' class for indivual styling

Installation

npm install vue2-undraw

Setup

You can use the vue-undraw in multiple approaches. Keep in mind that the total size of all illustrations goes beyond 20mb. A global usage in vue projects is technical possible, but not generaly not recommended.

1. Register a component by referencing to the specific Source

This is the most simplest approach to keep depended projects as small as possible, by importing only the illustrations which are needed.

import UndrawAddColor from 'vue2-undraw/src/components/UndrawAddColor'

export default {
  components: {
    UndrawAddColor
  }
}

2. Register a component-module from 'vue2-undraw'

Similar to first approach. Benefits compared to first:

  1. shorter and clearer imports
  2. consistent illustrationnames

Feel free to take this approach if treeshaking is no problem. https://webpack.js.org/guides/tree-shaking/

import { UndrawAbstract, UndrawAddColor } from 'vue2-undraw'

export default {
  components: {
    UndrawAbstract
    UndrawAddColor
  }
}

3. Global installation (not recommended)

If project size does not need to be considered as much (e.g. in a design systems documentation env.) it is also possible to use the illustrations globally.

Just add this in your entrypoints js-file:

import * as VueUndraw from 'vue2-undraw'

Vue.use(VueUndraw)

Color Setup

By default the svgs colors are inherting the svgs/parents text-color. You can overwrite this colors by using the vue2-undraw css-class or by setting it up in the installations options. (If you don't want to install the components globally you need to add the noGlobalInstall: true key too)

import * as VueUndraw from 'vue2-undraw'

Vue.use(VueUndraw, {color: '#777777', noGlobalInstall: true})

Project Development

npm install

Renaming svgs

Rename saved svgs from undraw.co in the _illustrations dir. Some manual adjustments need to get done (e.g. removing a handfull of '-').

npm run rename

Component Creation

Create vue components from svgs. Some manual adjustments need to get done (e.g. syntax errors in components/index.js)

npm run components

Compiles and minifies for production

npm run build