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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-countries-grid-map

v0.0.1

Published

World and countries maps with a very unique style

Readme

vue-countries-grid-map

npm npm vue2

A Vue component that draws a series of interactive maps represented in a grid

This is a kinda strange proposal to display a map, my main idea is to represent small countries not with the their real size, but instead with a relative size that allows the user an ease identify. Plus, if you like pixel arts, you're gonna have more fun than the regular maps. Currently only counts with three maps; a world map, an USA map and a mexico map because...

If you like it, let me know to integrate more countries and add more options.

Installation

npm install --save vue-countries-grid-map

Default import

Install all the components:

import Vue from 'vue'
import VueCountriesGridMap from 'vue-countries-grid-map'

Vue.use(VueCountriesGridMap)

Distribution import

Install all the components:

import 'vue-countries-grid-map/dist/vue-countries-grid-map.css'
import VueCountriesGridMap from 'vue-countries-grid-map/dist/vue-countries-grid-map.common'

Vue.use(VueCountriesGridMap)

⚠️ You may have to setup your bundler to embed the css file in your page.

Browser

<link rel="stylesheet" href="vue-countries-grid-map/dist/vue-countries-grid-map.css"/>

<script src="vue.js"></script>
<script src="vue-countries-grid-map/dist/vue-countries-grid-map.browser.js"></script>

The plugin should be auto-installed. If not, you can install it manually with the instructions below.

Install all the components:

Vue.use(VueCountriesGridMap)

Source import

Install all the components:

import Vue from 'vue'
import VueCountriesGridMap from 'vue-countries-grid-map/src'

Vue.use(VueCountriesGridMap)

⚠️ You need to configure your bundler to compile .vue files. More info in the official documentation.

Options

Property | Type | Default | Description -------- | ---- | ------- | ----------- mapSelected | string | map_world | Allows users to choose between a collection of maps. The current available maps are 'map_world', 'map_mexico' and 'map_usa' primaryColor | string | green | Allow users to choose between a collections of colors. The current available colors are 'green', 'red', 'pink', 'purple', 'deepPurple', 'indigo', 'blue', 'lightBlue', 'cyan', 'teal', 'lightGreen', 'lime', 'yellow', 'amber', 'orange', 'deepOrange', 'brown', 'blueGrey', 'grey' colorType | string | random | Allow users to choose between a few types of colors. The current available options are 'random' and 'density' detailType | string | invisible | Allow users to choose between a few configurations for the detail display. The current available configurations are 'invisible' and 'side'

Example

<template>
  <div id="app">
    <select v-model="selected_option">
      <option v-for="option in mapOptions" v-bind:value="option.value" v-bind:key="option.value">{{option.text}}</option>
    </select>
    <select v-model="selected_color">
      <option v-for="option in colorOptions" v-bind:value="option.value" v-bind:key="option.value">{{option.text}}</option>
    </select>
    <select v-model="selected_type">
      <option v-for="option in typeOptions" v-bind:value="option.value" v-bind:key="option.value">{{option.text}}</option>
    </select>
    <select v-model="selected_detail">
      <option v-for="option in detailOptions" v-bind:value="option.value" v-bind:key="option.value">{{option.text}}</option>
    </select>
    <countries-grid-map 
      :mapSelected="selected_option" 
      :primaryColor="selected_color" 
      :colorType="selected_type"
      :detailType="selected_detail"
      @change-click-node="changeClickNode">
      <template slot="detail">
        <span v-if="actualNode!=null">A description of: {{ actualNode.name }}</span>
      </template>
    </countries-grid-map>
  </div>
</template>

<script>
  import {CountriesGridMap} from 'vue-countries-grid-map';

  export default {
    name: 'app',
    components: {
      CountriesGridMap
    },
    methods: {
      changeClickNode (actualNode) {
        this.actualNode = actualNode
      }
    },
    data: function() {
      return {
        actualNode: null,
        selected_option: 'map_world',
        selected_color: 'purple',
        selected_type: 'random',
        selected_detail: 'invisible',
        mapOptions: [
          { value: 'map_world', text: 'World' },
          { value: 'map_mexico', text: 'México' },
          { value: 'map_usa', text: 'United States of America' }
        ],
        typeOptions: [
          { value: 'random', text: 'Random' },
          { value: 'density', text: 'Density' }
        ],
        detailOptions: [
          { value: 'invisible', text: 'Without Detail' },
          { value: 'side', text: 'Side Detail' }
        ],
        colorOptions: [
          { value: 'red', text: 'Red' },
          { value: 'pink', text: 'Pink' },
          { value: 'purple', text: 'Purple' },
          { value: 'deepPurple', text: 'Deep Purple' },
          { value: 'indigo', text: 'Indigo' },
          { value: 'blue', text: 'Blue' },
          { value: 'lightBlue', text: 'Light Blue' },
          { value: 'cyan', text: 'Cyan' },
          { value: 'teal', text: 'Teal' },
          { value: 'green', text: 'Green' },
          { value: 'lightGreen', text: 'Light Green' },
          { value: 'lime', text: 'Lime' },
          { value: 'yellow', text: 'Yellow' },
          { value: 'amber', text: 'Amber' },
          { value: 'orange', text: 'Orange' },
          { value: 'deepOrange', text: 'Deep Orange' },
          { value: 'brown', text: 'Brown' },
          { value: 'blueGrey', text: 'Blue Grey' },
          { value: 'grey', text: 'Grey' },
        ]
      }
    }
  }
</script>

License

MIT