Skip to content

discue/ui-components

Repository files navigation

Vue logo


GitHub tag Latest Stable Version License
NPM Downloads NPM Downloads
contributions - welcome Made with Node.js


ui-components

A collection of themeable vue.js components used in discue.io.

Installation

Install with npm

  npm install @discue/ui-components

Usage

To change the default theme, register the module as a Vue Plugin and pass an object with theme properties. Valid theme property keys can be found in theme.js and theme-keys.js.

import { theme } from '@discue/ui-components'
import { createApp } from 'vue'
import App from './App.vue'

createApp(App)
    .use(theme, {
        [theme.TEXT_COLOR_DEFAULT]: 'text-gray-500'
    })
    .mount('#app')

In your component files, import any ui component from the main export and use it in your template.

<template>
    <NavLink href="#pricing">Go to pricing</NavLink>
</template>

<script setup>
import { NavLink } from '@discue/ui-components'
</script>

The list of currently available components can be found at ui.discue.io.

Run Tests

To run tests, run the following command

  npm run test:unit

License

MIT