Bring Conversations to Your Vue App With One Component

Vue Components for Comments, Reactions, and Ratings

Give your Vue app a comment section without writing a backend. Import one component, bind your IDs, and get threads, notifications, and moderation out of the box.

Installation guide About 5 minutes

Steps to Add Comments to Vue

The Hyvor Talk Vue library wraps our embeds as Vue components. You'll need a website ID: sign up at the Hyvor Talk Console, add your website with your app's domain, and copy the ID from Settings → Website.

  1. Install the library:

    npm install @hyvor/hyvor-talk-vue
  2. Add the <Comments> component where you want the comments. Its props are the same as the embed attributes.

    <script setup>
    import { Comments } from "@hyvor/hyvor-talk-vue";
    
    const props = defineProps(["post"]);
    </script>
    
    <template>
        <article>
            <h1>{{ post.title }}</h1>
            <div v-html="post.content"></div>
        </article>
    
        <Comments :website-id="YOUR_WEBSITE_ID" :page-id="post.id" />
    </template>

    Replace YOUR_WEBSITE_ID with your website ID, and bind a value that never changes, like the post ID, to page-id.

Show comment counts

Add <CommentCount> components wherever you want a count, then call CommentCounts.load() in onMounted.

<script setup>
import { onMounted } from "vue";
import { CommentCount } from "@hyvor/hyvor-talk-vue";
import { CommentCounts } from "@hyvor/hyvor-talk-base";

defineProps(["posts"]);

onMounted(() => {
    CommentCounts.load({
        "website-id": YOUR_WEBSITE_ID,
    });
});
</script>

<template>
    <a v-for="post in posts" :key="post.id" :href="post.url">
        {{ post.title }} (<CommentCount :page-id="post.id" />)
    </a>
</template>

Listen to events

Use v-on or @ to handle events. To call the API methods, add a template ref, which gives you the underlying web component.

<Comments
    :website-id="YOUR_WEBSITE_ID"
    :page-id="post.id"
    @loaded="() => console.log('Comments loaded')"
    @comment:published="(comment) => console.log('Comment published', comment)"
/>

That's it. Run your app and the comments appear where you placed the component. See the Vue library README for more examples.

Frequently asked questions

Yes. Install @hyvor/hyvor-talk-vue and add the <Comments> component. Comments are stored and served by Hyvor Talk, so there is no API or database for you to build.

No registration needed. It is a set of Vue components you import where you need them, inside <script setup> or a regular component. They wrap the <hyvor-talk-comments> web component.

Writing comments yourself means building threads, notifications, spam checks, moderation, and logins. A commenting platform for Vue gives you those on day one, plus reactions and ratings, while you keep full control of the styling.

It's a standard Vue component, so you use it in your Nuxt pages the same way. Pass a stable value from your route or content, like a slug, as the page-id.

Use :website-id and :page-id to bind values from your script, or plain attributes for fixed strings. All embed attributes work as props.

Yes. Listen with @comment:published, or any other event. A template ref gives you the web component if you want to call its API.

Yes, with single sign-on, available on the Business plan. Pass the SSO attributes as props and logged-in users can comment right away.

There is: 14 days, no credit card, cancel anytime. See plans.

Start your 14-day free trial now!

14-day free trial
No credit card required
Cancel anytime