@colletdev/vue
@colletdev/vue
Vue 3.3+ wrappers (Composition API) for the Collet component library. Typed props, emits, and template refs over 48 Rust/WASM Custom Elements.
Install
npm install @colletdev/vue @colletdev/core
Quick Start
<script setup lang="ts">
import { init, Button, TextInput } from '@colletdev/vue';
await init(); // once, at app startup
</script>
<template>
<Button variant="filled" label="Save" intent="primary" @cx-click="save" />
<TextInput label="Email" kind="email" @cx-input="onInput" />
</template>
Features
- Typed props -- union-literal types for all component enums
- Typed emits --
@cx-click,@cx-change,@cx-input, etc. with typeddetail - Template refs --
expose()-based refs for imperative methods (.open(),.close()) - Structured data --
SelectOption[],TableColumn[],AccordionItem[]fully typed - Ships compiled --
dist/contains ready-to-use.jsand.d.tsfiles
Volar Support
For global type checking of <cx-*> tags in templates, add to your tsconfig.json:
{
"compilerOptions": {
"types": ["@colletdev/vue/global"]
}
}
This enables autocomplete and type checking on raw Custom Element tags alongside the Vue wrapper components.
Event Pattern
Custom events use the cx- prefix. Vue's @ shorthand works as expected:
<template>
<Select label="Country" :options="countries" @cx-change="setCountry" />
</template>
API Reference
See @colletdev/docs for the full props/events reference and framework guides.
License
MIT -- github.com/Danrozen87/collet
Related Packages
@colletdev/docs
Collet component library documentation — API reference, framework guides, and AI...
13,399
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.6.1 | >=3.3.0 | MIT | |
| 0.6.0 | >=3.3.0 | MIT | |
| 0.5.1 | >=3.3.0 | MIT | |
| 0.4.37 | >=3.3.0 | MIT | |
| 0.4.36 | >=3.3.0 | MIT | |
| 0.4.35 | >=3.3.0 | MIT | |
| 0.4.34 | >=3.3.0 | MIT | |
| 0.4.33 | >=3.3.0 | MIT | |
| 0.4.32 | >=3.3.0 | MIT | |
| 0.4.31 | >=3.3.0 | MIT | |
| 0.4.30 | >=3.3.0 | MIT | |
| 0.4.29 | >=3.3.0 | MIT | |
| 0.4.28 | >=3.3.0 | MIT | |
| 0.4.25 | >=3.3.0 | MIT | |
| 0.4.24 | >=3.3.0 | MIT | |
| 0.4.22 | >=3.3.0 | MIT | |
| 0.4.21 | >=3.3.0 | MIT | |
| 0.4.20 | >=3.3.0 | MIT | |
| 0.4.19 | >=3.3.0 | MIT | |
| 0.4.18 | >=3.3.0 | MIT | |
| 0.4.17 | >=3.3.0 | MIT | |
| 0.4.16 | >=3.3.0 | MIT | |
| 0.4.15 | >=3.3.0 | MIT | |
| 0.4.14 | >=3.3.0 | MIT | |
| 0.4.13 | >=3.3.0 | MIT | |
| 0.4.12 | >=3.3.0 | MIT | |
| 0.4.10 | >=3.3.0 | MIT | |
| 0.4.9 | >=3.3.0 | MIT | |
| 0.4.7 | >=3.3.0 | MIT | |
| 0.4.6 | >=3.3.0 | MIT |
Showing the latest 30 of 100. See every release on npm