Kritzel Vue Integration

0.1.86 · active · verified Sun Apr 19

The `kritzel-vue` package (current version 0.1.86) serves as the official Vue.js integration layer for components built with the Kritzel Stencil library. It enables developers to seamlessly embed and utilize Kritzel's UI components directly within their Vue 3 applications, providing an idiomatic Vue experience around the underlying Stencil elements. As a pre-1.0 release, indicated by its version number, `kritzel-vue` is likely under active development with a potentially frequent release cadence. This also implies that breaking changes to its API surface are probable as it matures towards a stable 1.0 release. Its key differentiator lies in specifically facilitating the use of `kritzel-stencil` components in Vue, abstracting away the complexities of integrating Web Components into a Vue rendering environment and leveraging Vue's plugin system for global component registration.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates initializing a Vue 3 application, registering the Kritzel component library as a plugin, and using Kritzel components in a template.

import { createApp } from 'vue';
import App from './App.vue';
import { ComponentLibrary, KritzelEngine, KritzelControls } from 'kritzel-vue';

const app = createApp(App);
app.use(ComponentLibrary);
app.mount('#app');

// In your App.vue or another component:
// <script setup lang="ts">
// import { KritzelEngine, KritzelControls } from 'kritzel-vue'; // Already imported above if using globally via plugin
// </script>

// <template>
//   <div>
//     <h1>My Kritzel App</h1>
//     <KritzelEngine></KritzelEngine>
//     <KritzelControls></KritzelControls>
//   </div>
// </template>

// To run this, you would typically need a basic Vue project structure
// and ensure 'kritzel-stencil' is also installed as a peer dependency.

view raw JSON →