5.1.2 • Published 2 years ago

nhsuk-frontend-vue v5.1.2

Weekly downloads
40
License
MIT
Repository
github
Last release
2 years ago

nhsuk-frontend-vue

This is an unofficial port of nhsuk-frontend library in to a vue.js component library.

For previews and docs: Preview Page

NPM page: nhsuk-frontend-vue

Changelog: Changelog

Install

npm install nhsuk-frontend-vue

or

yarn add nhsuk-frontend-vue

Use

import { createApp } from 'vue';
import App from './App.vue';
import NhsukFrontendVue from 'nhsuk-frontend-vue';
import 'nhsuk-frontend-vue/nhsuk-frontend-vue.css';

const app = createApp(App);
app.use(NhsukFrontendVue);

If require router support, import router and add as option

import { createApp } from 'vue';
import App from './App.vue';
import NhsukFrontendVue from 'nhsuk-frontend-vue';
import 'nhsuk-frontend-vue/nhsuk-frontend-vue.css';
import router from './router';

const app = createApp(App);
app.use(NhsukFrontendVue, {router});

Then in vue components:

<template>
  <nhs-row>
    <nhs-col>
      <nhs-button>test button</nhs-button>
      ...
    </nhs-col>
  </nhs-row>
</template>

OR

Import each component individually

<template>
  <nhs-main>
    ...
  </nhs-main>
</template>

<script>
  import { defineComponent } from 'vue';
  import { NhsMain } from 'nhsuk-frontend-vue';

  export default defineComponent({
    components: {
      NhsMain
    }
  });
</script>

To build locally

git clone https://github.com/xLasercut/nhsuk-frontend-vue.git
cd nhsuk-frontend-vue
npm run build

The output files will be located in the dist folder

Running tests

This project uses backstop for screenshot tests

Backstop tests:

npm run backstop:test

License

NHS.UK frontend library MIT © NHS.UK frontend.

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago