Skip to content

Installation

Getting Vue 3 Disqus running takes two steps: install the package, then register the plugin with your Disqus shortname.

Add the package with your preferred package manager:

Terminal window
# pnpm
pnpm add vue3-disqus
Terminal window
# npm
npm install vue3-disqus
Terminal window
# yarn
yarn add vue3-disqus

Install the plugin in your app entry. Passing your Disqus shortname here makes it available to every <DisqusComments /> and <DisqusCount /> in your app, so you don’t have to repeat it on each component:

main.ts
import { createApp } from 'vue'
import Vue3Disqus from 'vue3-disqus'
import App from './App.vue'
createApp(App)
.use(Vue3Disqus, { shortname: 'your-forum-shortname' })
.mount('#app')

Registering the plugin also globally registers both components, so <DisqusComments /> and <DisqusCount /> are available in any template with no per-file import.

Per-component shortname (without the plugin)

Section titled “Per-component shortname (without the plugin)”

If you’d rather not register the plugin — or you need to render threads for more than one forum — you can import the components directly and pass shortname as a prop instead:

<script setup lang="ts">
import { DisqusComments } from 'vue3-disqus'
</script>
<template>
<DisqusComments shortname="your-forum-shortname" identifier="/blog/my-first-post" />
</template>

A shortname prop always wins over the one provided to the plugin.

identifier is the only required prop — it’s the stable, unique ID Disqus uses to tie a thread to a page:

<template>
<DisqusComments identifier="/blog/my-first-post" />
</template>
  • Usage — comment counts, events, lazy loading, and manual resets.
  • Configuration — the full props, events, and slots reference.