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

@govflanders/vl-ui-vue-components

v23.0.2

Published

Vlaanderen Vue components

Downloads

1,755

Readme

Vue Components

Getting started with Vue components

Vue components are standard Webcomponents that are wrapped within Vue JS. They serve the same purpose, and have the same functionality.

Install the Vue library

Vue components can be found at: https://www.npmjs.com/package/@govflanders/vl-ui-vue-components

Import in Nuxt

  1. Create vl-ui-vue-components.js in your plugins folder and add it to your Nuxt config (nuxt.config.js file):
plugins: ['~/plugins/vl-ui-vue-components'],
  1. Add the Vue components dependency to the build Object in your Nuxt config (nuxt.config.js file):
build: {
    maxChunkSize: 1000000,
    vendor: ['@govflanders/vl-ui-vue-components'],
  },
  1. Specify the components you want to use in ./plugins/vl-ui-vue-components.js
import Vue from 'vue';
import VueI18n from 'vue-i18n';

import {
  VlTitle,
  VlTitleCta,
  VlTitleSublink,
  VlButton,
  i18n,
} from '@govflanders/vl-ui-vue-components';

Vue.component('vl-title', VlTitle);
Vue.component('vl-title-cta', VlTitleCta);
Vue.component('vl-title-sublink', VlTitleSublink);
Vue.component('vl-button', VlButton);

Vue.use(VlCore);
Vue.use(VlUtil);
Vue.use(VueI18n);

const messages = i18n;
const vlI18n = new VueI18n({
  locale: 'nl-BE',
  messages,
});

Vue.use(vlI18n);

Note: Since the components are loaded as a plugin, you don’t need to reïmport them in every component or template.

Documentation

There is no documentation yet, but you can find live examples in the vl-build repository

Vl-build

To access the root files check out the dev branch of https://bitbucket.org/vlaamseoverheid/vl-build/.

Run the following commands:

npm install
npm run util:bootstrap
npm run vue:serve

A new browserwindow will prompt with a select box. All components that are available are in the select box.

Code examples

Go to the ./vue/docs/<component-name>/<component-name>.vue and select a component you would like to see code examples of.

To see the source template of a Vue component go to ./package/<component-name>/src/vue/<component-name>.vue.

To see the source logic of a Vue component go to ./package/<component-name>/src/vue/<component-name>.js

Adding styles

Vue components only contain Vue functionality. In order to embed the correct SCSS install the appropriate NPM packages and import the SCSS to your local build. Howto can be found at https://overheid.vlaanderen.be/webuniversum/v3/.

Make sure you have access to the private NPM packages. Ask on Slack for more information.