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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@alisaitteke/typebot-vue

v0.0.7

Published

Typebot Vue 3 Addon

Downloads

27

Readme

Vue 3 Typebot Components

Install

yarn add @alisaitteke/typebot-vue
npm install @alisaitteke/typebot-vue
pnpm add @alisaitteke/typebot-vue

What is Typebot?

Typebot enables you to build customizable chatbots that can be embedded into websites or apps, allowing for user interaction in a friendly and automated way. The platform offers a drag-and-drop interface, making it easy to create conversations, forms, and workflows to engage users.


screenshot

Components

Standard View

screenshot

This component integrates the Typebot in a standard format. The bot is displayed directly on the page.

Example Usage

<template>
  <type-bot-standard :config="typeBotStandardConfig"></type-bot-standard>
</template>

<script setup lang="ts">
const typeBotStandardConfig = {
  typebot: "product-recommendation-bn4nu5j",
  apiHost: "https://typebot.co",
}
</script>

Popup View

screenshot

This component displays Typebot as a popup. You can control when the popup automatically appears using autoShowDelay after the page has loaded.

Example Usage

<template>
  <type-bot-popup :config="typeBotPopupConfig"></type-bot-popup>
</template>

<script setup lang="ts">
const typeBotPopupConfig = {
  typebot: "product-recommendation-bn4nu5j",
  apiHost: "https://typebot.co",
  autoShowDelay: 1000, // The popup will appear automatically after 1 second
}
</script>

Bubble View

screenshot

This component displays a chat bubble in the corner of the page. When the user clicks on the bubble, the chatbot opens. You can also customize the theme and the preview message displayed on the bubble.

Example Usage

<template>
  <type-bot-bubble :config="typeBotBubbleConfig"></type-bot-bubble>
</template>

<script setup lang="ts">
const typeBotBubbleConfig = {
  typebot: "product-recommendation-bn4nu5j",
  apiHost: "https://typebot.co",
  previewMessage: { message: "I have a question for you!" },
  theme: {
    button: { backgroundColor: "#4A8BB2", customIconSrc: "🤩", size: "large" },
    previewMessage: {
      backgroundColor: "#598E71",
      textColor: "#FFFFFF",
      closeButtonBackgroundColor: "#9B74B7",
      closeButtonIconColor: "#D09C46",
    },
  },
}
</script>

Using with Nuxt.js

To use the Typebot Vue plugin in a Nuxt.js project, follow these steps:

Step 1. Create a Plugin File

In your Nuxt.js project, create a typebot.client.js file in the plugins/ directory:

// plugins/typebot.client.js
import { defineNuxtPlugin } from '#app'
import TypebotVue from '@alisaitteke/typebot-vue'

export default defineNuxtPlugin(nuxtApp => {
    nuxtApp.vueApp.use(TypebotVue)
})

Step 2. Register the Plugin in nuxt.config.js

Add the following entry to your nuxt.config.js to register the plugin:

export default {
  plugins: [
    { src: '~/plugins/typebot.client.js', mode: 'client' }
  ]
}

This setup ensures that the Typebot Vue plugin is initialized on the client-side only in your Nuxt.js project.


Why Custom Component Names?

Normally, the component names would follow the standard naming convention like typebot-standard. However, to avoid conflicts with Typebot's own DOM objects and naming conventions, we used custom names such as type-bot-standard, type-bot-popup, and type-bot-bubble. This small adjustment ensures smooth integration and prevents any potential issues with Typebot’s internal structure.


Disclaimer

This project is an unofficial Vue.js plugin for integrating Typebot into web applications. Typebot is a registered trademark of its respective owners. This plugin is not affiliated with or endorsed by the Typebot team. For official information, please visit typebot.io.