Skip to content

Configuration

This is the full reference for the plugin, both components, and the events they emit. For the everyday workflow and recipes, see Usage.

Passed as the second argument to app.use(Vue3Disqus, options).

OptionTypeDefaultDescription
shortnamestring(none)Your Disqus site shortname, used as the default for every component. A component’s own shortname prop overrides it.
app.use(Vue3Disqus, { shortname: 'your-forum-shortname' })

Renders a Disqus comment thread.

PropTypeRequiredDefaultDescription
identifierstringyesStable, unique ID Disqus uses to tie a thread to a page. Keep it consistent for a page across URL changes.
shortnamestringno(plugin value)Disqus shortname. Overrides the one given to the plugin. Required via either source, or the component throws.
urlstringno(current page)Canonical URL Disqus links back to. Changing it reloads the thread (useful for SPA navigation).
classstringnoClass forwarded to the thread element.
languagestringno'en'Disqus interface language. Changing it reloads the thread in the new language.
lazybooleannotrueLoad the embed only when the thread scrolls into view. Set false to load on mount.
lazyConfigobjectno{ root: null, rootMargin: '300px', threshold: 0.5 }Options passed to the IntersectionObserver used for lazy loading.
pageConfigobjectnoDisqus page config. Keys are validated against the supported set (see below).
ssoConfigobjectnoDisqus Single Sign-On config. Keys are validated against the supported set (see below).

Validated against: api_key, author_s3, category_id, identifier, integration, language, remote_auth_s3, slug, title, url. Passing an unsupported key triggers a Vue prop-validation warning in development.

Validated against: name, button, icon, url, logout, profile_url, width, height. See Disqus SSO docs for what each does.

Every Disqus callback is emitted as a kebab-case Vue event, with the Disqus payload as the argument.

EventDisqus callbackFires when
@pre-datapreDataBefore Disqus requests thread data.
@pre-initpreInitBefore the thread initializes.
@initonInitWhen the thread initializes.
@readyonReadyWhen the thread has finished loading and is interactive.
@after-renderafterRenderAfter the thread renders.
@pre-resetpreResetBefore the thread resets/reloads.
@identifyonIdentifyWhen a user is identified.
@before-commentbeforeCommentBefore a comment renders.
@new-commentonNewCommentWhen a new comment is posted.
@paginateonPaginateWhen the thread paginates (loads more comments).

Available via a template ref to the component.

MethodDescription
reset()Forces the thread to reload with the current props. Called automatically when url or language changes.

<DisqusComments /> renders the Disqus-managed #disqus_thread element and exposes no slots — the thread content is injected by Disqus’s own embed script.

Renders a live comment count for a page.

PropTypeRequiredDefaultDescription
identifierstringyesThe thread identifier whose count to display. Match the thread’s identifier.
shortnamestringno(plugin value)Disqus shortname. Overrides the one given to the plugin.
urlstringnoCanonical page URL. Used as the link target when tag="a", and as data-disqus-url when tag="span".
tagstringno'span'Element to render. Use 'a' to render a link to the thread ({url}#disqus_thread).

<DisqusCount /> renders the count text supplied by Disqus’s count script into the chosen tag, and exposes no slots.

MessageCause
Disqus shortname is requiredNo shortname was provided — neither via the plugin nor the component’s shortname prop. Provide one in either place.