Installation
Getting Vue 3 Disqus running takes two steps: install the package, then register the plugin with your Disqus shortname.
1. Install the package
Section titled “1. Install the package”Add the package with your preferred package manager:
# pnpmpnpm add vue3-disqus# npmnpm install vue3-disqus# yarnyarn add vue3-disqus2. Register the plugin
Section titled “2. Register the plugin”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:
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.
Render your first thread
Section titled “Render your first thread”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>Next steps
Section titled “Next steps”- Usage — comment counts, events, lazy loading, and manual resets.
- Configuration — the full props, events, and slots reference.