npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

v-chat-ui

v0.0.3

Published

AI Chat ui component library for Vue 3

Readme

VChat UI 🎉

Made with 💚 by Hiyield

[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![License][license-src]][license-href] [![Nuxt][nuxt-src]][nuxt-href]

VChat ui

VChat UI is a Vue 3 component library for building AI chat interfaces. It provides a set of customizable components to create chat UIs with ease. Whether you're building a chatbot, virtual assistant, or any conversational interface, VChat UI has you covered!

Installation 🚀

Install the library using npm or yarn:

npm install v-chat-ui

# or

yarn add v-chat-ui

Quick Start ✨

Here's how simple it is to get started with VChatUi:

<template>
  <VChatUi :messages="messages" v-model:userMessage="userMessage" @send="send" />
</template>

<script setup>
import { ref } from 'vue'

const messages = ref([
  { role: 'system', text: 'Welcome to VChat!' },
  { role: 'user', text: 'Hello, how are you?' }
])

const userMessage = ref('')

const send = async () => {
  // hit your API
  messages.value.push({ role: 'user', text: userMessage.value })
  userMessage.value = ''
}
</script>

That's it! You now have a fully functional chat interface. 🎉

Customization 🛠️

Want to make it your own? VChat UI is designed to be flexible and customizable. Here's how you can customize the slots to create a unique chat experience.

Customizing Slots

VChatUi Message Slot

<template>
  <VChatUi :messages="messages" v-model:userMessage="userMessage" @send="send">
    <template #message="{ message, index }">
      <div v-if="message.role === 'user'" class="user-message"><strong>User:</strong> {{ message.text }}</div>
      <div v-else-if="message.role === 'system'" class="system-message">
        <em>System:</em> {{ message.text }}
      </div>
    </template>
  </VChatUi>
</template>

<script setup>
import { ref } from 'vue'

const messages = ref([
  { role: 'system', text: 'Welcome to VChat!' },
  { role: 'user', text: 'Hello, how are you?' }
])

const userMessage = ref('')

const send = () => {
  messages.value.push({ role: 'user', text: userMessage.value })
  userMessage.value = ''
}
</script>

VChatUi Pre-Input Message Slot

<template>
  <VChatUi :messages="messages" v-model:userMessage="userMessage" @send="send">
    <template #pre-input-message>
      <div class="pre-input">Ask me anything! 🤖</div>
    </template>
  </VChatUi>
</template>

<script setup>
import { ref } from 'vue'

const messages = ref([])
const userMessage = ref('')

const send = () => {
  messages.value.push({ role: 'user', text: userMessage.value })
  userMessage.value = ''
}
</script>

VChatUi Input Slot

<template>
  <VChatUi :messages="messages" v-model:userMessage="userMessage" @send="send">
    <template #input>
      <div class="custom-input">
        <textarea
          v-model="userMessage"
          @keydown.enter.prevent="send"
          placeholder="Type your message..."
        ></textarea>
        <button @click="send">Send</button>
      </div>
    </template>
  </VChatUi>
</template>

<script setup>
import { ref } from 'vue'

const messages = ref([{ role: 'system', text: 'Welcome to VChat!' }])

const userMessage = ref('')

const send = () => {
  messages.value.push({ role: 'user', text: userMessage.value })
  userMessage.value = ''
}
</script>

Components 📦

VChatInput Component

A text input component for user messages.

Props

  • v-model (String): Two-way binding for the input value.

Events

  • send: Emitted when the user presses Enter.
  • focus: Emitted when the input gains focus.

Example Usage

<VChatInput v-model="userMessage" @send="send" @focus="onFocus" />

VChatSystemMessage Component

Displays system messages with optional text chunking.

Props

  • message (Object): A VChatMessage object representing the system message.

Example Usage

<VChatSystemMessage :message="{ text: 'System message' }" />

VChatUserMessage Component

Displays user messages.

Props

  • message (Object): A VChatMessage object representing the user message.

Example Usage

<VChatUserMessage :message="{ text: 'User message' }" />

VChatTextChunker Component

Animates text by displaying it in chunks with a fade-in effect.

Props

  • text (String): The text to display in chunks.

Example Usage

<VChatTextChunker text="This is a chunked message." />

Types 🛠️

VChatMessage Type

Represents a chat message.

Properties

  • role (String): The role of the sender (e.g., user, system).
  • text (String): The message content.
  • id (String): A unique identifier for the message.
  • index (Number): The index of the message.
  • object (Object): Any additional properties you want to include.

Example Usage

type VChatMessage = {
  role?: 'user' | 'system' | string
  text?: string
  id?: string
  index?: number
} & obect

License 📜

MIT