@wra-gov/vue-components
Welsh Revenue Authority Component Library
Vue component library created by Welsh Revenue Authority
Installation
Dependencies:
- Vue 3
- maska
Install,
npm install @wra-gov/vue-components
Usage
Default import
main.js,
import { createApp } from "vue";
import App from "./App.vue";
import Wra from "@wra-gov/vue-components";
const app = createApp(App);
// Global registration of all components
app.use(Wra);
app.mount("#app");
Named imports
Options API:
*.vue,
<script>
import WraButton from "@wra-gov/vue-components";
export default {
components: {
WraButton
}
};
</script>
Composition API:
*.vue,
<script setup>
import { WraButton } from "@wra-gov/vue-components";
</script>
...
Nuxt usage
Create a plugin in /plugins/component-library.js,
import WraComponents from "@wra-gov/vue-components";
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(WraComponents);
});
Tailwind Usage
By default registering the component library imports the CSS variables.
However, to use the colours the component library provides in Tailwind helper classes like this,
<div class="bg-wra-blue"></div>
The component library's Tailwind stylesheet must be imported. The instructions
are created for Tailwind 4+. The CSS file must be the file imported by index.html
tailwind.css / index.css/ style.css
@import "tailwindcss";
@import "@wra-gov/vue-components/tailwind.css";
Documentation
Licence and Copyright
WRA component library is available under Open Government 3.0 licence
Related Packages
Ocelot UI (OUI), a UI framework built with Vue 3 and Tailwind CSS, is designed t...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.35.6 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.5 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.4 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.3 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.2 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.35.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.34.2 | ^3.5.22 | OGL-UK-3.0 | |
| 0.34.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.34.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.33.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.33.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.32.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.31.3 | ^3.5.22 | OGL-UK-3.0 | |
| 0.31.2 | ^3.5.22 | OGL-UK-3.0 | |
| 0.31.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.31.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.30.2 | ^3.5.22 | OGL-UK-3.0 | |
| 0.30.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.30.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.29.4 | ^3.5.22 | OGL-UK-3.0 | |
| 0.29.3 | ^3.5.22 | OGL-UK-3.0 | |
| 0.29.2 | ^3.5.22 | OGL-UK-3.0 | |
| 0.29.1 | ^3.5.22 | OGL-UK-3.0 | |
| 0.29.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.28.6 | ^3.5.22 | OGL-UK-3.0 | |
| 0.28.5 | ^3.5.22 | OGL-UK-3.0 | |
| 0.28.3 | ^3.5.22 | OGL-UK-3.0 | |
| 0.28.0 | ^3.5.22 | OGL-UK-3.0 | |
| 0.27.2 | ^3.5.22 | OGL-UK-3.0 |
Showing the latest 30 of 96. See every release on npm