@maas/vue-primitive
Vue component for passing attributes to slot content
10,270
6
| Install | |
|---|---|
npm install @maas/vue-primitive |
|
| Latest Version: | 1.4.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Nov 17, 2025 |
| Links: | GitHub · npm |
Maintainer: robinscholz
🥚 Vue Primitive
📦 Install
pnpm install @maas/vue-primitive
🪄 Use
as
<template>
<Primitive as="button" type="button" @click="handleClick">
Click me
</Primitive>
</template>
<button type="button">Click me</button>
asChild
<template>
<Primitive as-child type="button" class="my-button" @click="handleClick">
<button>Click me</button>
</Primitive>
</template>
<button type="button" class="my-button">Click me</button>
🐛 Found a Bug?
If you see something that doesn’t look right, submit a bug report. See it. Say it. Sorted.
🤝 Credit
This package is mostly a port of Radix Vue’s Primitive component. The original concept of the asChild prop was invented by the creators of Radix Primitives as far as we know.
📄 License
MIT License © 2024-PRESENT Magic as a Service GmbH
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.4.0 | ^3.5.13 | MIT | |
| 1.3.0 | ^3.5.13 | MIT | |
| 1.2.1 | ^3.5.13 | MIT | |
| 1.2.0 | ^3.5.13 | MIT | |
| 1.1.0 | ^3.4.31 | MIT | |
| 1.0.4 | ^3.4.31 | MIT | |
| 1.0.3 | ^3.4.31 | MIT | |
| 1.0.2 | ^3.4.31 | MIT | |
| 1.0.1 | ^3.4.31 | MIT | |
| 1.0.0 | ^3.4.31 | MIT |