Skip to content

vanduo-oss/vue

Repository files navigation

@vanduo-oss/vue

npm license: MIT

First-class Vue 3 engine of the Vanduo design system.

Typed Vd* components and composables. One install gives you the Vue engine; the design tokens (@vanduo-oss/core) and runtime/styles (@vanduo-oss/framework) come along automatically.

Install

pnpm add @vanduo-oss/vue

vue and pinia (toast store) are peer dependencies.

Quick start

// main.ts
import { createApp } from "vue";
import { createPinia } from "pinia";
import { VanduoVue } from "@vanduo-oss/vue";
import "@vanduo-oss/vue/css"; // forwards the Vanduo stylesheet
import App from "./App.vue";

createApp(App).use(createPinia()).use(VanduoVue).mount("#app");
<script setup lang="ts">
import { VdButton, useToast } from "@vanduo-oss/vue";
const toast = useToast();
</script>

<template>
  <VdButton variant="primary" @click="toast.show({ message: 'Hi' })">Open</VdButton>
</template>

For SSR/SSG, await loadVanduoRuntime() before mounting so the framework's client JS is ready.

Documentation

License

MIT © Vanduo

About

VD2 — first-class Vue 3 components and composables for the Vanduo design system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors