A @coreui/vue
v3
components library project
For library guide please visit our Documentation site »
Check out demo of components usage: CoreUI Vue Admin Template »
npm install @coreui/vue
// Installing whole package
import CoreuiVue from '@coreui/vue';
Vue.use(CoreuiVue);
// Registering a single component
import { CSwitch, CButton } from '@coreui/vue';
// globally
Vue.component('CButton', CButton)
export default {
...
// locally
components: {
CSwitch
},
...
}
// Registering single directives
import { CEmitRootEvent, CTooltip } from '@coreui/vue';
// globally
Vue.directive('c-emit-root-event', CEmitRootEvent)
export default {
...
// locally
directives: {
'c-tooltip': CTooltip
},
...
}
Components are imported from CommonJS module by default, if you want to use only specific components you can import them from source to enable treeshaking.
// Import components this way to allow tree shaking
import { CDataTable } from '@coreui/vue/src';
See the GitHub release history.
See CONTRIBUTING.md.
Some design ideas and solutions in this library are inspired by Bootstrap-Vue library