@ai-sdk/vue
Vue.js UI components for the AI SDK:
38,632,143
27,547
| Install | |
|---|---|
npm install @ai-sdk/vue |
|
| Latest Version: | 4.0.155 |
| Vue: | 3 |
| License: | Apache-2.0 |
| Last Updated: | Oct 28, 2026 |
| Links: | GitHub · npm |
Maintainer: vercel-release-bot
AI SDK - Vue.js integration
Vue.js UI components for the AI SDK:
Setup
npm i ai @ai-sdk/vue
Usage
<script setup lang="ts">
import { useChat } from "@ai-sdk/vue";
import { ref } from "vue";
const input = ref("");
const { messages, sendMessage } = useChat();
const handleSubmit = (e: Event) => {
e.preventDefault();
sendMessage({ text: input.value });
input.value = "";
};
</script>
<template>
<div>
<div v-for="(m, index) in messages" :key="m.id ? m.id : index">
{{ m.role === "user" ? "User: " : "AI: " }}
<div
v-for="(part, index) in m.parts"
:key="`${m.id}-${part.type}-${index}`"
>
<div v-if="part.type === 'text'">{{ part.text }}</div>
</div>
</div>
<form @submit="handleSubmit">
<input v-model="input" placeholder="Say something..." />
</form>
</div>
</template>
See the Vue.js documentation for more information.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 4.0.155 | ^3.3.4 | Apache-2.0 | |
| 4.0.154 | ^3.3.4 | Apache-2.0 | |
| 4.0.153 | ^3.3.4 | Apache-2.0 | |
| 4.0.152 | ^3.3.4 | Apache-2.0 | |
| 4.0.151 | ^3.3.4 | Apache-2.0 | |
| 4.0.150 | ^3.3.4 | Apache-2.0 | |
| 4.0.149 | ^3.3.4 | Apache-2.0 | |
| 4.0.148 | ^3.3.4 | Apache-2.0 | |
| 4.0.147 | ^3.3.4 | Apache-2.0 | |
| 4.0.146 | ^3.3.4 | Apache-2.0 | |
| 4.0.145 | ^3.3.4 | Apache-2.0 | |
| 4.0.144 | ^3.3.4 | Apache-2.0 | |
| 4.0.143 | ^3.3.4 | Apache-2.0 | |
| 4.0.142 | ^3.3.4 | Apache-2.0 | |
| 4.0.141 | ^3.3.4 | Apache-2.0 | |
| 4.0.140 | ^3.3.4 | Apache-2.0 | |
| 4.0.139 | ^3.3.4 | Apache-2.0 | |
| 4.0.138 | ^3.3.4 | Apache-2.0 | |
| 4.0.137 | ^3.3.4 | Apache-2.0 | |
| 4.0.136 | ^3.3.4 | Apache-2.0 | |
| 4.0.135 | ^3.3.4 | Apache-2.0 | |
| 4.0.134 | ^3.3.4 | Apache-2.0 | |
| 4.0.133 | ^3.3.4 | Apache-2.0 | |
| 4.0.132 | ^3.3.4 | Apache-2.0 | |
| 4.0.131 | ^3.3.4 | Apache-2.0 | |
| 4.0.130 | ^3.3.4 | Apache-2.0 | |
| 4.0.129 | ^3.3.4 | Apache-2.0 | |
| 4.0.128 | ^3.3.4 | Apache-2.0 | |
| 4.0.127 | ^3.3.4 | Apache-2.0 | |
| 4.0.126 | ^3.3.4 | Apache-2.0 |
Showing the latest 30 of 845. See every release on npm
Pre-releases (458)
| Version | Released | Vue | License |
|---|---|---|---|
| 4.0.0-beta.187 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.186 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.185 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.184 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.183 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.182 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.181 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.180 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.179 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.178 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.177 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.116 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.115 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.114 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.113 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.112 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.111 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.109 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.108 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.107 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.106 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.105 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.104 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.103 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.101 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.100 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.99 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.98 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.97 | ^3.3.4 | Apache-2.0 | |
| 4.0.0-beta.96 | ^3.3.4 | Apache-2.0 |
Showing the latest 30 of 458. See every release on npm