nextcloud-vue/docs/index.md

1.7 KiB

npm last version travis build status Dependabot status Codacy Badge Code coverage irc

This repo contains the various Vue.js components that Nextcloud uses for its internal design and structure.

Installation

npm i --save @nextcloud/vue

Usage

import { NcAppNavigation } from '@nextcloud/vue'

export default {
    name: 'MyComponent',
    components: {
        NcAppNavigation
    }
}

You can also import individual module without bundling the full library.

import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar'

Recommendations

Some components require Nextcloud functionality to work, so it is currently recommended to extend Vue with the following:

Vue.prototype.OC = window.OC
Vue.prototype.OCA = window.OCA