JSPM

@public-ui/vue

2.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 145
  • Score
    100M100P100Q82986F
  • License EUPL-1.2

Vue framework adapter for the KoliBri accessible web component library (@public-ui).

Package Exports

  • @public-ui/vue

Readme

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>