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

vue-papercups

v1.1.1

Published

A Vue 3 component for Papercups chat

Downloads

32

Readme

vue-papercups

A Papercups chat widget component for Vue 3.

Installation

Install using NPM.

$ npm install --save vue-papercups

Add the vue-papercups component globally to your Vue 3 app.

// main.js
import VuePapercups from "vue-papercups";

app.use(VuePapercups);

Use in your component templates.

// App.vue

<vue-papercups account-id="your-papercups-account-id" />

Props

These are the props you can pass into your <vue-papercups /> component:

| Prop | Type | Value | Default | | :-------------------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | | accountId | string | Your Papercups account token | N/A | | title | string | The title in the header of your chat widget | Welcome! | | subtitle | string | The subtitle in the header of your chat widget | How can we help you? | | newMessagePlaceholder | string | The placeholder text in the new message input | Start typing... | | emailInputPlaceholder | string | The placeholder text in the optional email input | Enter your email | | newMessagesNotificationText | string | The notification text when new messages arrive and the chat window is closed | View new messages | | primaryColor | string | The theme color of your chat widget | 1890ff | | greeting | string | An optional initial message to greet your customers with | N/A | | showAgentAvailability | boolean | If you want to show whether you (or your agents) are online or not | false | | agentAvailableText | string | The text shown when you (or your agents) are online | We're online right now! | | agentUnavailableText | string | The text shown when you (and your agents) are offline | We're away at the moment. | | customer | object | Identifying information for the customer, including name, email, external_id, and metadata (for any custom fields) | N/A | | baseUrl | string | The base URL of your API if you're self-hosting Papercups | https://app.papercups.io | | iframeUrlOverride | string | An override of the iframe URL we use to render the chat, if you chose to self-host that as well | https://chat-widget.papercups.io | | requireEmailUpfront | boolean | If you want to require unidentified customers to provide their email before they can message you | false | | defaultIsOpen | boolean | If you want the chat widget to open as soon as it loads | false | | customIconUrl | string | A link to a custom icon image URL | N/A |

Events

| Event | Type | Value | Default | | :-------------------- | :--------------------------- | :--------------------------------------------------- | :------ | | chatLoaded | () => void | Callback fired when chat is loaded | N/A | | chatOpened | () => void | Callback fired when chat is opened | N/A | | chatClosed | () => void | Callback fired when chat is closed | N/A | | messageSent | (message: Message) => void | Callback fired when message is sent | N/A | | messageReceived | (message: Message) => void | Callback fired when message is received | N/A | | scriptLoaded | (message: Message) => void | Callback fired when Papercups widget script loads | N/A | | scriptError | (message: Message) => void | Callback fired on Papercups widget script load error | N/A |

For example:

// App.vue
<vue-papercups
  account-id="your-papercups-account-id"
  @chatLoaded="yourCallbackMethod"
/>

Global API

Use the global $papercups object to interact with the chat widget or get its current config in your Vue components.

// open chat
this.$papercups.open();

// close chat
this.$papercups.close();

// toggle chat
this.$papercups.toggle();

// show widget
this.$papercups.show();

// hide widget
this.$papercups.hide();

// create widget - call destroy first to avoid loading the widget script multiple times
this.$papercups.create();

// destroy widget
this.$papercups.destroy();

// get current config
const config = this.$papercups.config();

Used in

Tracknack

Relevant links

Papercups

Papercups chat widget repository

License

MIT © Viesturs Marnauza

Twitter