@public-ui/vue
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

KoliBri - Vue-Adapter

Motivation

Provide an adapter for Vue to use the KoliBri components.

Installation

You can install the adapter with npm, pnpm or yarn:

npm i -g @public-ui/vue
pnpm i -g @public-ui/vue
yarn add -g @public-ui/vue

Usage

First, initialize KoliBri with a theme and create a Vue app:

import { createApp } from 'vue';
import { DEFAULT } from '@public-ui/themes';
import { defineCustomElements } from '@public-ui/components/dist/loader';
import { register } from '@public-ui/components';

register(DEFAULT, defineCustomElements)
	.then(() => {
		createApp(App).mount(htmlDivElement);
	})
	.catch((error) => {
		/* Handle errors */
	});

Then, you can import any component from @public-ui/vue and render it within your Vue application:

<script setup>
import { KolButton } from '@public-ui/vue';
</script>
<template>
	<KolButton _label="Hello World" />
</template>

Package Sidebar

Install

npm i @public-ui/vue

Weekly Downloads

78

Version

2.1.0

License

EUPL-1.2

Unpacked Size

61.9 kB

Total Files

6

Last publish

Collaborators

  • itzbund
  • m.oppitz